Bug 1956726 - Migrate histograms to use Glean APIs for WEBFONT_*, r=chutten.

Differential Revision: https://phabricator.services.mozilla.com/D242767
This commit is contained in:
Florian Quèze
2025-04-03 13:42:52 +00:00
parent e8696f257b
commit 6afb2c9c36
5 changed files with 169 additions and 22 deletions

View File

@@ -1210,12 +1210,11 @@ void PresShell::Destroy() {
uint32_t fontCount;
uint64_t fontSize;
fs->GetLoadStatistics(fontCount, fontSize);
Telemetry::Accumulate(Telemetry::WEBFONT_PER_PAGE, fontCount);
Telemetry::Accumulate(Telemetry::WEBFONT_SIZE_PER_PAGE,
uint32_t(fontSize / 1024));
glean::webfont::per_page.Add(fontCount);
glean::webfont::size_per_page.Accumulate(uint32_t(fontSize / 1024));
} else {
Telemetry::Accumulate(Telemetry::WEBFONT_PER_PAGE, 0);
Telemetry::Accumulate(Telemetry::WEBFONT_SIZE_PER_PAGE, 0);
glean::webfont::per_page.Add(0);
glean::webfont::size_per_page.Accumulate(0);
}
}