Loading gfx/metrics.yaml 0 → 100644 +27 −0 Original line number Diff line number Diff line # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # This file defines the metrics that are recorded by the Glean SDK. They are # automatically converted to platform-specific code at build time using the # `glean_parser` PyPI package. --- $schema: moz://mozilla.org/schemas/glean/metrics/2-0-0 paint: build_displaylist_time: type: timing_distribution description: > The time to build a Gecko display list. bugs: - https://bugzilla.mozilla.org/show_bug.cgi?id=1728423 data_reviews: - https://bugzilla.mozilla.org/show_bug.cgi?id=1728423 data_sensitivity: - technical notification_emails: - gfx-telemetry-alerts@mozilla.com - mwoodrow@mozilla.com expires: never telemetry_mirror: PAINT_BUILD_DISPLAYLIST_TIME layout/base/nsLayoutUtils.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/DisplayPortUtils.h" #include "mozilla/GeckoBindings.h" #include "mozilla/glean/GleanMetrics.h" #include "mozilla/dom/AnonymousContent.h" #include "mozilla/dom/BrowserChild.h" #include "mozilla/dom/CanvasUtils.h" Loading Loading @@ -3136,6 +3137,7 @@ void nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, PresShell* presShell = presContext->PresShell(); TimeStamp startBuildDisplayList = TimeStamp::Now(); auto dlTimerId = mozilla::glean::paint::build_displaylist_time.Start(); const bool buildCaret = !(aFlags & PaintFrameFlags::HideCaret); Loading Loading @@ -3435,9 +3437,7 @@ void nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, const double geckoDLBuildTime = (TimeStamp::Now() - startBuildDisplayList).ToMilliseconds(); Telemetry::Accumulate(Telemetry::PAINT_BUILD_DISPLAYLIST_TIME, geckoDLBuildTime); mozilla::glean::paint::build_displaylist_time.StopAndAccumulate(std::move(dlTimerId)); bool consoleNeedsDisplayList = (gfxUtils::DumpDisplayList() || gfxEnv::DumpPaint()) && Loading toolkit/components/glean/metrics_index.py +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ metrics_yamls = [ "toolkit/components/glean/tests/test_metrics.yaml", "toolkit/mozapps/update/metrics.yaml", "browser/base/content/metrics.yaml", "gfx/metrics.yaml", ] # The list of all Glean pings.yaml files, relative to the top src dir. Loading Loading
gfx/metrics.yaml 0 → 100644 +27 −0 Original line number Diff line number Diff line # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # This file defines the metrics that are recorded by the Glean SDK. They are # automatically converted to platform-specific code at build time using the # `glean_parser` PyPI package. --- $schema: moz://mozilla.org/schemas/glean/metrics/2-0-0 paint: build_displaylist_time: type: timing_distribution description: > The time to build a Gecko display list. bugs: - https://bugzilla.mozilla.org/show_bug.cgi?id=1728423 data_reviews: - https://bugzilla.mozilla.org/show_bug.cgi?id=1728423 data_sensitivity: - technical notification_emails: - gfx-telemetry-alerts@mozilla.com - mwoodrow@mozilla.com expires: never telemetry_mirror: PAINT_BUILD_DISPLAYLIST_TIME
layout/base/nsLayoutUtils.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/DisplayPortUtils.h" #include "mozilla/GeckoBindings.h" #include "mozilla/glean/GleanMetrics.h" #include "mozilla/dom/AnonymousContent.h" #include "mozilla/dom/BrowserChild.h" #include "mozilla/dom/CanvasUtils.h" Loading Loading @@ -3136,6 +3137,7 @@ void nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, PresShell* presShell = presContext->PresShell(); TimeStamp startBuildDisplayList = TimeStamp::Now(); auto dlTimerId = mozilla::glean::paint::build_displaylist_time.Start(); const bool buildCaret = !(aFlags & PaintFrameFlags::HideCaret); Loading Loading @@ -3435,9 +3437,7 @@ void nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, const double geckoDLBuildTime = (TimeStamp::Now() - startBuildDisplayList).ToMilliseconds(); Telemetry::Accumulate(Telemetry::PAINT_BUILD_DISPLAYLIST_TIME, geckoDLBuildTime); mozilla::glean::paint::build_displaylist_time.StopAndAccumulate(std::move(dlTimerId)); bool consoleNeedsDisplayList = (gfxUtils::DumpDisplayList() || gfxEnv::DumpPaint()) && Loading
toolkit/components/glean/metrics_index.py +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ metrics_yamls = [ "toolkit/components/glean/tests/test_metrics.yaml", "toolkit/mozapps/update/metrics.yaml", "browser/base/content/metrics.yaml", "gfx/metrics.yaml", ] # The list of all Glean pings.yaml files, relative to the top src dir. Loading