Skip to content

Commit

Permalink
Bug 1515132: Add telemetry for FirstContentfulPaint data-review=chutt…
Browse files Browse the repository at this point in the history
…en r=mstange, a=lizzard

Defined in the PerformancePaintTiming spec, though we're not supporting the
DOM API yet

--HG--
extra : source : 134b85ae973cb92917cedc21ac624e75a8f27406
  • Loading branch information
jesup committed Feb 12, 2019
1 parent 9d71547 commit ebb213c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dom/base/nsDOMNavigationTiming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,11 @@ void nsDOMNavigationTiming::NotifyContentfulPaintForRootContentDocument() {
TTI_WINDOW_SIZE_MS,
nsITimer::TYPE_ONE_SHOT_LOW_PRIORITY,
"nsDOMNavigationTiming::TTITimeout");

if (mDocShellHasBeenActiveSinceNavigationStart) {
Telemetry::AccumulateTimeDelta(Telemetry::TIME_TO_FIRST_CONTENTFUL_PAINT_MS,
mNavigationStart, mContentfulPaint);
}
}

void nsDOMNavigationTiming::NotifyDOMContentFlushedForRootContentDocument() {
Expand Down
11 changes: 11 additions & 0 deletions toolkit/components/telemetry/Histograms.json
Original file line number Diff line number Diff line change
Expand Up @@ -13369,6 +13369,17 @@
"bug_numbers": [1411632],
"description": "The time between navigation start and the first non-blank paint of a foreground root content document, in milliseconds. This only records documents that were in an active docshell throughout the whole time between navigation start and non-blank paint. The non-blank paint timestamp is taken during display list building and does not include rasterization or compositing of that paint. This probe only accumulates when there were no active-tab network load optimizations happening during the interval."
},
"TIME_TO_FIRST_CONTENTFUL_PAINT_MS": {
"record_in_processes": ["main", "content"],
"alert_emails": ["[email protected]", "[email protected]", "[email protected]", "[email protected]"],
"expires_in_version": "never",
"releaseChannelCollection": "opt-out",
"kind": "exponential",
"high": 100000,
"n_buckets": 100,
"bug_numbers": [1515132],
"description": "The time between navigation start and the first contentful paint of a foreground root content document, in milliseconds. This only records documents that were in an active docshell throughout the whole time between navigation start and contentful paint. The contentful paint timestamp is taken during display list building and does not include rasterization or compositing of that paint."
},
"TAB_AUDIO_INDICATOR_USED": {
"record_in_processes": ["main", "content"],
"alert_emails": ["[email protected]"],
Expand Down

0 comments on commit ebb213c

Please sign in to comment.