forked from mirrors/gecko-dev
Bug 1692934 - Record meta.profilingEndTime in each process - r=canaltinova
This profilingEndTime is the time when this property is actually written, which corresponds to the end of the profiling session. If it's a shutdown profile, the exact same time is used for the existing `meta.shutdownTime` property. Depends on D151355 Differential Revision: https://phabricator.services.mozilla.com/D151356
This commit is contained in:
parent
29a5385f1e
commit
12a671a4c4
3 changed files with 9 additions and 2 deletions
|
|
@ -1871,8 +1871,11 @@ static void StreamMetaJSCustomObject(PSLockRef aLock,
|
||||||
aWriter.NullProperty("contentEarliestTime");
|
aWriter.NullProperty("contentEarliestTime");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const double profilingEndTime = profiler_time();
|
||||||
|
aWriter.DoubleProperty("profilingEndTime", profilingEndTime);
|
||||||
|
|
||||||
if (aIsShuttingDown) {
|
if (aIsShuttingDown) {
|
||||||
aWriter.DoubleProperty("shutdownTime", profiler_time());
|
aWriter.DoubleProperty("shutdownTime", profilingEndTime);
|
||||||
} else {
|
} else {
|
||||||
aWriter.NullProperty("shutdownTime");
|
aWriter.NullProperty("shutdownTime");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2805,8 +2805,11 @@ static void StreamMetaJSCustomObject(
|
||||||
aWriter.NullProperty("contentEarliestTime");
|
aWriter.NullProperty("contentEarliestTime");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const double profilingEndTime = profiler_time();
|
||||||
|
aWriter.DoubleProperty("profilingEndTime", profilingEndTime);
|
||||||
|
|
||||||
if (aIsShuttingDown) {
|
if (aIsShuttingDown) {
|
||||||
aWriter.DoubleProperty("shutdownTime", profiler_time());
|
aWriter.DoubleProperty("shutdownTime", profilingEndTime);
|
||||||
} else {
|
} else {
|
||||||
aWriter.NullProperty("shutdownTime");
|
aWriter.NullProperty("shutdownTime");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1380,6 +1380,7 @@ static void JSONRootCheck(const Json::Value& aRoot,
|
||||||
EXPECT_HAS_JSON(meta["startTime"], Double);
|
EXPECT_HAS_JSON(meta["startTime"], Double);
|
||||||
EXPECT_HAS_JSON(meta["profilingStartTime"], Double);
|
EXPECT_HAS_JSON(meta["profilingStartTime"], Double);
|
||||||
EXPECT_HAS_JSON(meta["contentEarliestTime"], Double);
|
EXPECT_HAS_JSON(meta["contentEarliestTime"], Double);
|
||||||
|
EXPECT_HAS_JSON(meta["profilingEndTime"], Double);
|
||||||
|
|
||||||
EXPECT_HAS_JSON(aRoot["pages"], Array);
|
EXPECT_HAS_JSON(aRoot["pages"], Array);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue