Closed Bug 1942117 Opened 7 months ago Closed 5 months ago

Text-Fragments: Add use counters and performance telemetry

Categories

(Core :: DOM: Navigation, task)

task

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: jjaschke, Assigned: r.kossel)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

Now that Text Fragments and creating Text Fragments is feature-complete, there should be some telemetry probes added to measure its usage and performance impact.

Things that should be logged:

  • Counter for pages that have a fragment directive
  • Time spent in TextDirectiveFinder::FindTextDirectivesInDocument() (per page load. This function might be called several times)
  • How many text directives were in the URL? This can be found out by the length of the returned array of TextDirectiveFinder::FindTextDirectivesInDocument(); again, this function might be called several times.
  • Amount of pages where a text directive cannot be found after loading has finished (can be checked by checking for FragmentDirective::HasUninvokedDirectives() after Document::ScrollToRef(). Note: Not 100% sure this is the right place. Note 2: Not too sure this number is too helpful, as links can become stale quickly. It is expected that text fragment links might not work after some time.
  • Time spent in FragmentDirective::CreateTextDirective() (which was added in Bug 1934825, patch 2)
  • Additionally: How many other matches were on the page for the target range? The correlation of this value with the total time might be interesting.
  • Use counter: How often does FragmentDirective::CreateTextDirective() not find a text fragment.

Documentation for adding Histograms and Scalars.

Adding telemetry needs data collection review.

To look at collected telemetry for the current session go to about:telemetry

Assignee: nobody → r.kossel
Status: NEW → ASSIGNED
Pushed by jjaschke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7be279d979df Part 1: define metrics for text-fragments, r=jjaschke https://hg.mozilla.org/integration/autoland/rev/2c3f00e616c8 Part 2: gather metrics for text fragments, r=jjaschke https://hg.mozilla.org/integration/autoland/rev/3c9074e36c91 Part 3: test metrics for text fragments, r=jjaschke
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
Regressions: 1958601
Regressions: 1959429
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: