TelemetryHistograms shouldn't have to pre-allocated every KeyedHistogram

RESOLVED FIXED

Status

()

Toolkit
Telemetry
P3
normal
RESOLVED FIXED
a year ago
2 months ago

People

(Reporter: chutten, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [measurement:client])

(Reporter)

Description

a year ago
As noticed in in bug 1218576 comment 49 and referenced again in bug 1304494, having to pre-allocated every keyedhistogram for each process type is kinda silly. Especially since it's primarly due to some code structure choices in TelemetrySession.jsm which can likely be changed.

We can almost certainly do better.
I think the proper way to fix this is to fix our snapshotting.

We only use snapshotting of individual keyed histograms in tests and for the ping assembly in TelemetrySession.jsm.
Both could instead use a proper snapshotting API for keyed histograms: one function to snapshot all keyed histograms, potentially filtered by process type etc.
Priority: -- → P3
Whiteboard: [measurement:client]
Once we handle this properly, we can remove the workaround here:
https://dxr.mozilla.org/mozilla-central/rev/9baec74b3db1bf005c66ae2f50bafbdb02c3be38/toolkit/components/telemetry/TelemetryHistogram.cpp#2001
(Reporter)

Comment 3

2 months ago
Fixed by bug 1366294
Status: NEW → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.