mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1877843 - Migrate javascript.pageload GVST metrics r=perry.mcmanis,denispal
Differential Revision: https://phabricator.services.mozilla.com/D200974
This commit is contained in:
parent
e1dedf867e
commit
1d5878c7f9
@ -1928,10 +1928,6 @@ void Document::LoadEventFired() {
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t ConvertToUnsignedFromDouble(double aNumber) {
|
||||
return aNumber < 0 ? 0 : static_cast<uint32_t>(aNumber);
|
||||
}
|
||||
|
||||
void Document::RecordPageLoadEventTelemetry(
|
||||
glean::perf::PageLoadExtra& aEventTelemetryData) {
|
||||
// If the page load time is empty, then the content wasn't something we want
|
||||
@ -2244,41 +2240,34 @@ void Document::AccumulateJSTelemetry(
|
||||
JS::JSTimers timers = JS::GetJSTimers(cx);
|
||||
|
||||
if (!timers.executionTime.IsZero()) {
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::JS_PAGELOAD_EXECUTION_MS,
|
||||
ConvertToUnsignedFromDouble(timers.executionTime.ToMilliseconds()));
|
||||
glean::javascript_pageload::execution_time.AccumulateRawDuration(
|
||||
timers.executionTime);
|
||||
aEventTelemetryDataOut.jsExecTime = mozilla::Some(
|
||||
static_cast<uint32_t>(timers.executionTime.ToMilliseconds()));
|
||||
}
|
||||
|
||||
if (!timers.delazificationTime.IsZero()) {
|
||||
Telemetry::Accumulate(Telemetry::JS_PAGELOAD_DELAZIFICATION_MS,
|
||||
ConvertToUnsignedFromDouble(
|
||||
timers.delazificationTime.ToMilliseconds()));
|
||||
glean::javascript_pageload::delazification_time.AccumulateRawDuration(
|
||||
timers.delazificationTime);
|
||||
}
|
||||
|
||||
if (!timers.xdrEncodingTime.IsZero()) {
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::JS_PAGELOAD_XDR_ENCODING_MS,
|
||||
ConvertToUnsignedFromDouble(timers.xdrEncodingTime.ToMilliseconds()));
|
||||
glean::javascript_pageload::xdr_encode_time.AccumulateRawDuration(
|
||||
timers.xdrEncodingTime);
|
||||
}
|
||||
|
||||
if (!timers.baselineCompileTime.IsZero()) {
|
||||
Telemetry::Accumulate(Telemetry::JS_PAGELOAD_BASELINE_COMPILE_MS,
|
||||
ConvertToUnsignedFromDouble(
|
||||
timers.baselineCompileTime.ToMilliseconds()));
|
||||
glean::javascript_pageload::baseline_compile_time.AccumulateRawDuration(
|
||||
timers.baselineCompileTime);
|
||||
}
|
||||
|
||||
if (!timers.gcTime.IsZero()) {
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::JS_PAGELOAD_GC_MS,
|
||||
ConvertToUnsignedFromDouble(timers.gcTime.ToMilliseconds()));
|
||||
glean::javascript_pageload::gc_time.AccumulateRawDuration(timers.gcTime);
|
||||
}
|
||||
|
||||
if (!timers.protectTime.IsZero()) {
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::JS_PAGELOAD_PROTECT_MS,
|
||||
ConvertToUnsignedFromDouble(timers.protectTime.ToMilliseconds()));
|
||||
glean::javascript_pageload::protect_time.AccumulateRawDuration(
|
||||
timers.protectTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
122
dom/metrics.yaml
122
dom/metrics.yaml
@ -357,3 +357,125 @@ performance.page:
|
||||
- vchin@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
|
||||
javascript.pageload:
|
||||
execution_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
telemetry_mirror: JS_PAGELOAD_EXECUTION_MS
|
||||
description: >
|
||||
Time spent during page load executing Javascript in ms.
|
||||
(Migrated from the geckoview metric of the same name.)
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
delazification_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
telemetry_mirror: JS_PAGELOAD_DELAZIFICATION_MS
|
||||
description: >
|
||||
Time spent during page load delazifying Javascript in ms.
|
||||
(Migrated from the geckoview metric of the same name.)
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
xdr_encode_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
telemetry_mirror: JS_PAGELOAD_XDR_ENCODING_MS
|
||||
description: >
|
||||
Time spent during page load XDR encoding Javascript in ms.
|
||||
(Migrated from the geckoview metric of the same name.)
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
baseline_compile_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
telemetry_mirror: JS_PAGELOAD_BASELINE_COMPILE_MS
|
||||
description: >
|
||||
Time spent during page load baseline compiling Javascript in ms.
|
||||
(Migrated from the geckoview metric of the same name.)
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
gc_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
telemetry_mirror: JS_PAGELOAD_GC_MS
|
||||
description: >
|
||||
Time spent during page load in the GC in ms.
|
||||
(Migrated from the geckoview metric of the same name.)
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
parse_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
telemetry_mirror: JS_PAGELOAD_PARSE_MS
|
||||
description: >
|
||||
Time spent during page load syntax parsing JS scripts on
|
||||
the main thread in ms.
|
||||
(Migrated from the geckoview metric of the same name.)
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
protect_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
telemetry_mirror: JS_PAGELOAD_PROTECT_MS
|
||||
description: >
|
||||
Time spent during page load protecting JIT executable memory.
|
||||
(Migrated from the geckoview metric of the same name.)
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
@ -2856,9 +2856,8 @@ void ScriptLoader::LoadEventFired() {
|
||||
MaybeTriggerBytecodeEncoding();
|
||||
|
||||
if (!mMainThreadParseTime.IsZero()) {
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::JS_PAGELOAD_PARSE_MS,
|
||||
static_cast<uint32_t>(mMainThreadParseTime.ToMilliseconds()));
|
||||
glean::javascript_pageload::parse_time.AccumulateRawDuration(
|
||||
mMainThreadParseTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15246,7 +15246,7 @@
|
||||
},
|
||||
"JS_PAGELOAD_EXECUTION_MS": {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox", "geckoview_streaming"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": [
|
||||
"dpalmeiro@mozilla.com",
|
||||
"perf-telemetry-alerts@mozilla.com"
|
||||
@ -15261,7 +15261,7 @@
|
||||
},
|
||||
"JS_PAGELOAD_DELAZIFICATION_MS": {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox", "geckoview_streaming"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": [
|
||||
"dpalmeiro@mozilla.com",
|
||||
"perf-telemetry-alerts@mozilla.com"
|
||||
@ -15276,7 +15276,7 @@
|
||||
},
|
||||
"JS_PAGELOAD_XDR_ENCODING_MS": {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox", "geckoview_streaming"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": [
|
||||
"dpalmeiro@mozilla.com",
|
||||
"perf-telemetry-alerts@mozilla.com"
|
||||
@ -15291,7 +15291,7 @@
|
||||
},
|
||||
"JS_PAGELOAD_BASELINE_COMPILE_MS": {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox", "geckoview_streaming"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": [
|
||||
"dpalmeiro@mozilla.com",
|
||||
"perf-telemetry-alerts@mozilla.com"
|
||||
@ -15306,7 +15306,7 @@
|
||||
},
|
||||
"JS_PAGELOAD_GC_MS": {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox", "geckoview_streaming"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": [
|
||||
"dpalmeiro@mozilla.com",
|
||||
"perf-telemetry-alerts@mozilla.com"
|
||||
@ -15321,7 +15321,7 @@
|
||||
},
|
||||
"JS_PAGELOAD_PROTECT_MS": {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox", "geckoview_streaming"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": [
|
||||
"dpalmeiro@mozilla.com",
|
||||
"perf-telemetry-alerts@mozilla.com"
|
||||
@ -15336,7 +15336,7 @@
|
||||
},
|
||||
"JS_PAGELOAD_PARSE_MS": {
|
||||
"record_in_processes": ["content"],
|
||||
"products": ["firefox", "geckoview_streaming"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": [
|
||||
"dpalmeiro@mozilla.com",
|
||||
"perf-telemetry-alerts@mozilla.com"
|
||||
|
@ -12,107 +12,6 @@
|
||||
---
|
||||
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
|
||||
|
||||
javascript.pageload:
|
||||
execution_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
gecko_datapoint: JS_PAGELOAD_EXECUTION_MS
|
||||
description: >
|
||||
Time spent during page load executing Javascript in ms.
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
delazification_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
gecko_datapoint: JS_PAGELOAD_DELAZIFICATION_MS
|
||||
description: >
|
||||
Time spent during page load delazifying Javascript in ms.
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
xdr_encode_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
gecko_datapoint: JS_PAGELOAD_XDR_ENCODING_MS
|
||||
description: >
|
||||
Time spent during page load XDR encoding Javascript in ms.
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
baseline_compile_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
gecko_datapoint: JS_PAGELOAD_BASELINE_COMPILE_MS
|
||||
description: >
|
||||
Time spent during page load baseline compiling Javascript in ms.
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
gc_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
gecko_datapoint: JS_PAGELOAD_GC_MS
|
||||
description: >
|
||||
Time spent during page load in the GC in ms.
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
parse_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
gecko_datapoint: JS_PAGELOAD_PARSE_MS
|
||||
description: >
|
||||
Time spent during page load syntax parsing JS scripts on
|
||||
the main thread in ms.
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
protect_time:
|
||||
type: timing_distribution
|
||||
time_unit: millisecond
|
||||
gecko_datapoint: JS_PAGELOAD_PROTECT_MS
|
||||
description: >
|
||||
Time spent during page load protecting JIT executable memory.
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1709139#c4
|
||||
notification_emails:
|
||||
- dpalmeiro@mozilla.com
|
||||
- perf-telemetry-alerts@mozilla.com
|
||||
expires: never
|
||||
|
||||
javascript.gc:
|
||||
total_time:
|
||||
type: timing_distribution
|
||||
|
Loading…
Reference in New Issue
Block a user