diff --git a/accessible/base/NotificationController.cpp b/accessible/base/NotificationController.cpp index 856783f97b7f..4a217d8931c2 100644 --- a/accessible/base/NotificationController.cpp +++ b/accessible/base/NotificationController.cpp @@ -21,7 +21,7 @@ #include "mozilla/PresShell.h" #include "mozilla/ProfilerMarkers.h" #include "nsAccessibilityService.h" -#include "mozilla/Telemetry.h" +#include "mozilla/glean/AccessibleMetrics.h" using namespace mozilla; using namespace mozilla::a11y; @@ -679,7 +679,7 @@ void NotificationController::ProcessMutationEvents() { void NotificationController::WillRefresh(mozilla::TimeStamp aTime) { AUTO_PROFILER_MARKER_TEXT("NotificationController::WillRefresh", A11Y, {}, ""_ns); - Telemetry::AutoTimer timer; + auto timer = glean::a11y::tree_update_timing.Measure(); // DO NOT ADD CODE ABOVE THIS BLOCK: THIS CODE IS MEASURING TIMINGS. AUTO_PROFILER_LABEL("NotificationController::WillRefresh", A11Y); diff --git a/accessible/base/Statistics.h b/accessible/base/Statistics.h index 4882880245af..1950c0e2b871 100644 --- a/accessible/base/Statistics.h +++ b/accessible/base/Statistics.h @@ -7,14 +7,14 @@ #ifndef A11Y_STATISTICS_H_ #define A11Y_STATISTICS_H_ -#include "mozilla/Telemetry.h" +#include "mozilla/glean/AccessibleMetrics.h" namespace mozilla { namespace a11y { namespace statistics { inline void A11yConsumers(uint32_t aConsumer) { - Telemetry::Accumulate(Telemetry::A11Y_CONSUMERS, aConsumer); + glean::a11y::consumers.AccumulateSingleSample(aConsumer); } } // namespace statistics diff --git a/accessible/metrics.yaml b/accessible/metrics.yaml index 920269d23a6b..7fbb50797dbb 100644 --- a/accessible/metrics.yaml +++ b/accessible/metrics.yaml @@ -154,3 +154,41 @@ a11y: - always - never telemetry_mirror: A11Y_THEME + + consumers: + type: custom_distribution + description: | + A list of known accessibility clients that inject into Firefox process space (see https://searchfox.org/mozilla-central/source/accessible/windows/msaa/Compatibility.h). + This metric was generated to correspond to the Legacy Telemetry enumerated histogram A11Y_CONSUMERS. + range_min: 0 + range_max: 11 + bucket_count: 12 + histogram_type: linear + bugs: + - https://bugzilla.mozilla.org/show_bug.cgi?id=1382820 + - https://bugzilla.mozilla.org/show_bug.cgi?id=1462238 + data_reviews: + - https://bugzilla.mozilla.org/show_bug.cgi?id=1382820 + - https://bugzilla.mozilla.org/show_bug.cgi?id=1462238 + notification_emails: + - accessibility@mozilla.com + - jteh@mozilla.com + expires: never + telemetry_mirror: A11Y_CONSUMERS + + tree_update_timing: + type: timing_distribution + description: > + The amount of time taken to update the accessibility tree (ms) + + This metric was generated to correspond to the Legacy Telemetry + exponential histogram A11Y_TREE_UPDATE_TIMING_MS. + time_unit: millisecond + bugs: + - https://bugzilla.mozilla.org/show_bug.cgi?id=1424768 + data_reviews: + - https://bugzilla.mozilla.org/show_bug.cgi?id=1424768 + notification_emails: + - asurkov@mozilla.com + expires: never + telemetry_mirror: A11Y_TREE_UPDATE_TIMING_MS