Closed Bug 1678159 Opened 4 years ago Closed 4 years ago

Move WritePropertyTime to SpliceableJSONWriter

Categories

(Core :: Gecko Profiler, task, P2)

task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently the free function WritePropertyTime must be used to write TimeStamps into markers.

This can be easy to miss, and is inconsistent with other data-writing functions, which are all in SpliceableJSONWriter (and base class JSONWriter).

So I think WritePropertyTime should be moved to SpliceableJSONWriter.

Inside StreamJSONMarkerData functions, statements such as:

    mozilla::baseprofiler::WritePropertyTime(aWriter, "prefAccessTime",
                                             aPrefAccessTime);

will become:

    aWriter.TimeProperty("prefAccessTime", aPrefAccessTime);

TimeStamps in markers must now be streamed through SpliceableJSONWriter::TimeProperty(name, timestamp).
This is consistent with all other JSON-writing functions being in SpliceableJSONWriter (and base class JSONWriter).

Depends on D97556

Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d6f9575749d2 Move WritePropertyTime to SpliceableJSONWriter::TimeProperty - r=gregtatum
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: