Closed Bug 1892097 Opened 1 year ago Closed 1 year ago

TimingDistributionMetric would benefit from a single-duration API

Categories

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

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chutten|PTO, Assigned: chutten|PTO)

References

Details

Attachments

(1 file)

bug 1881297 introduced a single-sample API to CustomDistributionMetric and TimingDistributionMetric. Unfortunately, FOG can't use the latter one, since it doesn't know how to translate from a duration to a sample (it doesn't keep the TimeUnit around).

Maybe we should consider a accumulate_raw_duration API that takes a std::time::Duration? Or a accumulate_raw_single_sample_nanos for a u64's worth of nanos?

...and maybe we reconsider exposing accumulate_single_sample since bindings won't necessarily be able to make the duration-to-sample conversion themselves.

Assignee: nobody → chutten
Priority: -- → P1
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: