Bug 1120992 - Add totalTime (uptime in seconds) to the Telemetry session payload. r=vladan

--HG--
extra : rebase_source : 57f3cb504b12c8b2567636ef83c71e7201dd669a
This commit is contained in:
Alessio Placitelli 2015-03-04 02:10:00 -05:00
Родитель 1911ea7c0e
Коммит 48d8618214
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -508,9 +508,10 @@ let Impl = {
let si = Services.startup.getStartupInfo();
// Measurements common to chrome and content processes.
let elapsedTime = Date.now() - si.process;
var ret = {
// uptime in minutes
uptime: Math.round((new Date() - si.process) / 60000)
totalTime: Math.round(elapsedTime / 1000), // totalTime, in seconds
uptime: Math.round(elapsedTime / 60000) // uptime in minutes
}
// Look for app-specific timestamps

Просмотреть файл

@ -298,6 +298,7 @@ function checkPayload(payload, reason, successfulPings) {
Assert.ok("info" in payload, "Payload must contain an info section.");
checkPayloadInfo(payload.info);
Assert.ok(payload.simpleMeasurements.totalTime >= 0);
Assert.ok(payload.simpleMeasurements.uptime >= 0);
Assert.equal(payload.simpleMeasurements.startupInterrupted, 1);
Assert.equal(payload.simpleMeasurements.shutdownDuration, SHUTDOWN_TIME);