Bug 1471588 - Include sample rate in budget comment. r=padenot

MozReview-Commit-ID: Ge74gpH3mFI

--HG--
extra : rebase_source : 6fbcc02c75a2dc1e0e814f8b0f14f8ad75c24c5f
This commit is contained in:
Andreas Pehrson 2018-06-27 15:34:21 +02:00
parent a9b35c1210
commit a14b817045
2 changed files with 6 additions and 4 deletions

View File

@ -43,12 +43,13 @@ AutoTracer::PrintBudget(const char* aName,
uint64_t aDuration,
uint64_t aPID,
uint64_t aThread,
uint64_t aFrames)
uint64_t aFrames,
uint64_t aSampleRate)
{
mLogger.Log("{\"name\": \"%s\", \"cat\": \"%s\", \"ph\": \"X\","
"\"ts\": %" PRIu64 ", \"dur\": %" PRIu64 ", \"pid\": %" PRIu64 ","
"\"tid\": %" PRIu64 ", \"args\": { \"comment\": %" PRIu64 "}},",
aName, aCategory, NowInUs(), aDuration, aPID, aThread, aFrames);
"\"tid\": %" PRIu64 ", \"args\": { \"comment\": \"%" PRIu64 "/%" PRIu64 "\"}},",
aName, aCategory, NowInUs(), aDuration, aPID, aThread, aFrames, aSampleRate);
}
AutoTracer::AutoTracer(AsyncLogger& aLogger,

View File

@ -111,7 +111,8 @@ private:
uint64_t aDuration,
uint64_t aPID,
uint64_t aThread,
uint64_t aFrames);
uint64_t aFrames,
uint64_t aSampleRate);
// The logger to use. It musdt have a lifetime longer than the block an
// instance of this class traces.