Bug 1574187 - Add a samples object that contains all the samples in profilerOverhead. r=gerald

Differential Revision: https://phabricator.services.mozilla.com/D42285

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nazım Can Altınova 2019-08-16 12:17:29 +00:00
parent ac1bd5ecbb
commit 6eb786c0d4
2 changed files with 4 additions and 0 deletions

View File

@ -805,6 +805,7 @@ void ProfileBuffer::StreamProfilerOverheadToJSON(
EntryGetter e(*this);
aWriter.StartObjectProperty("profilerOverhead_UNSTABLE");
aWriter.StartObjectProperty("samples");
// Stream all sampling overhead data. We skip other entries, because we
// process them in StreamSamplesToJSON()/etc.
{
@ -881,6 +882,7 @@ void ProfileBuffer::StreamProfilerOverheadToJSON(
e.Next();
}
aWriter.EndArray(); // data
aWriter.EndObject(); // samples
// Only output statistics if there is at least one full interval (and
// therefore at least two samplings.)

View File

@ -1198,6 +1198,7 @@ void ProfileBuffer::StreamProfilerOverheadToJSON(
EntryGetter e(*this);
aWriter.StartObjectProperty("profilerOverhead_UNSTABLE");
aWriter.StartObjectProperty("samples");
// Stream all sampling overhead data. We skip other entries, because we
// process them in StreamSamplesToJSON()/etc.
{
@ -1274,6 +1275,7 @@ void ProfileBuffer::StreamProfilerOverheadToJSON(
e.Next();
}
aWriter.EndArray(); // data
aWriter.EndObject(); // samples
// Only output statistics if there is at least one full interval (and
// therefore at least two samplings.)