Closed Bug 1921514 Opened 10 months ago Closed 10 months ago

Implement sample-based APIs on JS for timing distributions

Categories

(Toolkit :: Telemetry, task, P3)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: chutten, Assigned: bdk)

References

Details

(Whiteboard: [disco-])

Attachments

(1 file)

At present, timing distribution metrics don't have APIs in JS for recording times that are measured externally.

Our design philosophy with Glean has moved over the years from "Forbid everything but cases where we can assert correctness (e.g. monotonicity of timing)" to "Permit advanced users to scale back protections, trusting them to read the documentation (e.g. accepting raw durations)". This is in-line with that evolution: exposing to advanced users of the JS API some APIs for recording samples.

(( This does not invalidate our previous commentary about the duration API, though. mozJS still lacks a time duration type, so what this bug proposes is specific to sample-based APIs, not duration-based ones. Documentation warning users to keep the unit of their samples in-sync with time_unit will be deployed. ))

This bug is about implementing accumulate_single_sample and accumulate_samples for Firefox Desktop JS. Don't forget:

  • Document the need to sync the samples' units to the defined time_unit on the API surfaces
  • Document the new API support in the book (don't forget labeled).
  • Add tests to test_Glean.js and all the rest to ensure this works in normal, JOG, GIFFT, and IPC modes.
Assignee: nobody → bdeankawamura
Whiteboard: [disco-]
Status: NEW → ASSIGNED
Pushed by bdeankawamura@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a6e4ae44d85c Timing distribution sample API, r=chutten,webidl,smaug
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Blocks: 1937610
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: