Closed Bug 1696945 Opened 1 year ago Closed 1 year ago

Extend PerfStats to record arbitrary durations


(Core :: Performance, enhancement, P1)




88 Branch
Tracking Status
firefox88 --- fixed


(Reporter: acreskey, Assigned: acreskey)



(2 files)

The current PerfStats API provide methods to Start/Stop recording for metric as well as an RAII object that records while in scope.

This bug is to extend the PerfStats API to also allow arbitrary durations to be recorded for new metrics.

As an example (included in the patch), this is useful for capturing the amount of time elapsed on http requests, both from the network and from the cache.

Add PerfStats::RecordMeasurement( metric, duration ) api so we can record timings for async metrics where details are not always known until completion.

Also added recording of Http channel completion time (network and cache)

Attachment #9207500 - Attachment description: Bug 1696945 - Extend PerfStats to record arbitrary durations r=bas → Bug 1696945 - Part 1: Extend PerfStats to record arbitrary durations r=bas

Record from asyncOpen to channel completion in HttpChannelChild, for both network and cache sources.
This will allow us to capture cross-platform networking timings in pageload and other scenarios.

Pushed by
Part 1: Extend PerfStats to record arbitrary durations r=bas,necko-reviewers,valentin
Part 2: Add Http Channel completon PerfStats r=necko-reviewers,dragana
Severity: -- → S3
Priority: -- → P1
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.