Bug 1464506 - Output the thread id where the file IO happened - r=canaltinova

The thread id (if present) is output in a new "threadId" field.

Differential Revision: https://phabricator.services.mozilla.com/D75762
This commit is contained in:
Gerald Squelart 2020-05-25 08:57:36 +00:00
parent 7e583a4107
commit ae37f20b88
2 changed files with 2 additions and 4 deletions

View File

@ -250,7 +250,7 @@ void FileIOMarkerPayload::StreamPayload(SpliceableJSONWriter& aWriter,
aWriter.StringProperty("filename", mFilename.get());
}
if (mIOThreadId.isSome()) {
// TODO: Output the thread id.
aWriter.IntProperty("threadId", *mIOThreadId);
}
}

View File

@ -1116,9 +1116,7 @@ TEST(GeckoProfiler, Markers)
EXPECT_EQ_JSON(payload["operation"], String, "operation2");
EXPECT_EQ_JSON(payload["source"], String, "source2");
EXPECT_EQ_JSON(payload["filename"], String, "filename2");
// TODO: Once JSON output of the thread id is implemented, check
// that there is a thread id in this payload.
EXPECT_FALSE(payload.isMember("threadId"));
EXPECT_EQ_JSON(payload["threadId"], Int, 123);
} else if (nameString == "DOMEventMarkerPayload marker") {
EXPECT_EQ(state, S_DOMEventMarkerPayload);