Closed Bug 1630997 Opened 6 months ago Closed 6 months ago

Implement solution for coarse time measurement

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mdroettboom, Assigned: mdroettboom)

Details

Attachments

(2 files)

This should implement the proposal in bug 1595723.

Priority: P3 → P2
Whiteboard: [telemetry:glean-rs:m?]
Attached file Proposal document

Implementation proposal

The proposal here is not to implement an entirely new metric type, but to allow the time_unit property to specify the base time unit of the distribution, which would change the minimum and maximum of the range. The unit of data in the payload would remain nanoseconds, which provides complete backward compatibility with directly recorded Glean data, as well as data recorded from GeckoView through project EXTRACT. The mapping function from measurement to bucket would remain i = ⌊8log2(x)⌋.

After implementing this proposal, the accepted values for time_unit, which specifies the base value, would be "nanosecond", "microsecond" and "millisecond".

If the user specifies a base unit of nanosecond (equivalent to the current implementation), the maximum time is 10 minutes.

If the user specified a base unit of microsecond, the minimum recordable value would be 1 μs == 1,000 ns, and the maximum would be 10,000 minutes, or ~6.94 days.

If the user specified a base unit of millisecond, the minimum recordable value would be 1 ms == 1,000,000 ns the maximum would be 10,000,000 minutes, or ~19 years.

Given this range, in the interest of not creating more flexibility than is necessary, only these 3 base units would be supported.

Summary: Implement solution for course time measurement → Implement solution for coarse time measurement
Assignee: nobody → mdroettboom
Priority: P2 → P1
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.