Implement solution for coarse time measurement
Categories
(Data Platform and Tools :: Glean: SDK, defect, P1)
Tracking
(Not tracked)
People
(Reporter: mdroettboom, Assigned: mdroettboom)
Details
Attachments
(2 files)
This should implement the proposal in bug 1595723.
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
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.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Description
•