Bug 1877843 - Migrate javascript.gc GVST metrics r=perry.mcmanis,sfink

Due to JS' relationship with Gecko symbols in general and Telemetry in
particular, this is a side-by-side migration where the Telemetry calls remain
in place and the Glean calls are additional.

(Instead of using GIFFT as an all-in-one, as is preferred).

Differential Revision: https://phabricator.services.mozilla.com/D201015
This commit is contained in:
Chris H-C 2024-02-09 21:11:07 +00:00
Родитель 1d5878c7f9
Коммит 234057f722
4 изменённых файлов: 170 добавлений и 128 удалений

Просмотреть файл

@ -53,3 +53,133 @@ performance.clone.deserialize:
notification_emails:
- sfink@mozilla.com
expires: never
javascript.gc:
total_time:
type: timing_distribution
time_unit: millisecond
description: >
The total time taken by a major collection.
(Migrated from the geckoview metric of the same name.)
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c8
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
minor_time:
type: timing_distribution
time_unit: microsecond
description: >
The time taked by a minor (nursery) collection.
(Migrated from the geckoview metric of the same name.)
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
prepare_time:
type: timing_distribution
time_unit: millisecond
description: >
The time spent in the preparation phase.
(Migrated from the geckoview metric of the same name.)
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
mark_roots_time:
type: timing_distribution
time_unit: microsecond
description: >
The time spent marking GC roots.
(Migrated from the geckoview metric of the same name.)
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
mark_time:
type: timing_distribution
time_unit: millisecond
description: >
The time spent in the mark phase.
(Migrated from the geckoview metric of the same name.)
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
sweep_time:
type: timing_distribution
time_unit: millisecond
description: >
The time spent in the sweep phase.
(Migrated from the geckoview metric of the same name.)
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
compact_time:
type: timing_distribution
time_unit: millisecond
description: >
The time spent in the compact phase.
(Migrated from the geckoview metric of the same name.)
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
slice_time:
type: timing_distribution
time_unit: millisecond
description: >
The time spent running a GC slice.
(Migrated from the geckoview metric of the same name.)
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
- https://bugzilla.mozilla.org/show_bug.cgi?id=1877843
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never

Просмотреть файл

@ -2589,6 +2589,38 @@ static void AccumulateTelemetryCallback(JSMetric id, uint32_t sample) {
glean::performance_clone_deserialize::time.AccumulateRawDuration(
TimeDuration::FromMicroseconds(sample));
break;
case JSMetric::GC_MS:
glean::javascript_gc::total_time.AccumulateRawDuration(
TimeDuration::FromMilliseconds(sample));
break;
case JSMetric::GC_MINOR_US:
glean::javascript_gc::minor_time.AccumulateRawDuration(
TimeDuration::FromMicroseconds(sample));
break;
case JSMetric::GC_PREPARE_MS:
glean::javascript_gc::prepare_time.AccumulateRawDuration(
TimeDuration::FromMilliseconds(sample));
break;
case JSMetric::GC_MARK_ROOTS_US:
glean::javascript_gc::mark_roots_time.AccumulateRawDuration(
TimeDuration::FromMicroseconds(sample));
break;
case JSMetric::GC_MARK_MS:
glean::javascript_gc::mark_time.AccumulateRawDuration(
TimeDuration::FromMilliseconds(sample));
break;
case JSMetric::GC_SWEEP_MS:
glean::javascript_gc::sweep_time.AccumulateRawDuration(
TimeDuration::FromMilliseconds(sample));
break;
case JSMetric::GC_COMPACT_MS:
glean::javascript_gc::compact_time.AccumulateRawDuration(
TimeDuration::FromMilliseconds(sample));
break;
case JSMetric::GC_SLICE_MS:
glean::javascript_gc::slice_time.AccumulateRawDuration(
TimeDuration::FromMilliseconds(sample));
break;
default:
// The rest aren't relayed to Glean.
break;

Просмотреть файл

@ -816,7 +816,7 @@
},
"GC_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "geckoview_streaming"],
"products": ["firefox"],
"alert_emails": [
"dev-telemetry-gc-alerts@mozilla.org",
"jcoppeard@mozilla.com"
@ -914,7 +914,7 @@
},
"GC_PREPARE_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "geckoview_streaming"],
"products": ["firefox"],
"alert_emails": [
"dev-telemetry-gc-alerts@mozilla.org",
"jcoppeard@mozilla.com"
@ -929,7 +929,7 @@
},
"GC_MARK_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "geckoview_streaming"],
"products": ["firefox"],
"alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
"expires_in_version": "never",
"kind": "exponential",
@ -940,7 +940,7 @@
},
"GC_SWEEP_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "geckoview_streaming"],
"products": ["firefox"],
"alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
"expires_in_version": "never",
"kind": "exponential",
@ -951,7 +951,7 @@
},
"GC_COMPACT_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "geckoview_streaming"],
"products": ["firefox"],
"alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
"expires_in_version": "never",
"kind": "exponential",
@ -962,7 +962,7 @@
},
"GC_MARK_ROOTS_US": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "geckoview_streaming"],
"products": ["firefox"],
"alert_emails": [
"dev-telemetry-gc-alerts@mozilla.org",
"jcoppeard@mozilla.com"
@ -1007,7 +1007,7 @@
},
"GC_SLICE_MS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "geckoview_streaming"],
"products": ["firefox"],
"alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
"expires_in_version": "never",
"kind": "exponential",
@ -1110,7 +1110,7 @@
},
"GC_MINOR_US": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "geckoview_streaming"],
"products": ["firefox"],
"alert_emails": ["dev-telemetry-gc-alerts@mozilla.org"],
"expires_in_version": "never",
"kind": "exponential",

Просмотреть файл

@ -12,123 +12,3 @@
---
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
javascript.gc:
total_time:
type: timing_distribution
time_unit: millisecond
gecko_datapoint: GC_MS
description: >
The total time taken by a major collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c8
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
minor_time:
type: timing_distribution
time_unit: microsecond
gecko_datapoint: GC_MINOR_US
description: >
The time taked by a minor (nursery) collection.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
prepare_time:
type: timing_distribution
time_unit: millisecond
gecko_datapoint: GC_PREPARE_MS
description: >
The time spent in the preparation phase.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
mark_roots_time:
type: timing_distribution
time_unit: microsecond
gecko_datapoint: GC_MARK_ROOTS_US
description: >
The time spent marking GC roots.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
mark_time:
type: timing_distribution
time_unit: millisecond
gecko_datapoint: GC_MARK_MS
description: >
The time spent in the mark phase.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
sweep_time:
type: timing_distribution
time_unit: millisecond
gecko_datapoint: GC_SWEEP_MS
description: >
The time spent in the sweep phase.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
compact_time:
type: timing_distribution
time_unit: millisecond
gecko_datapoint: GC_COMPACT_MS
description: >
The time spent in the compact phase.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never
slice_time:
type: timing_distribution
time_unit: millisecond
gecko_datapoint: GC_SLICE_MS
description: >
The time spent running a GC slice.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419
data_reviews:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1636419#c17
notification_emails:
- dev-telemetry-gc-alerts@mozilla.org
- jcoppeard@mozilla.com
expires: never