mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 666707 - Add a telemetry probe to record whether we started following a successful shutdown r=zpao
This commit is contained in:
parent
ca7e11eb83
commit
6c90dd6553
@ -147,6 +147,12 @@ SessionStartup.prototype = {
|
||||
initialState && initialState.session && initialState.session.state &&
|
||||
initialState.session.state == STATE_RUNNING_STR;
|
||||
|
||||
// Report shutdown success via telemetry. Shortcoming here are
|
||||
// being-killed-by-OS-shutdown-logic, shutdown freezing after
|
||||
// session restore was written, etc.
|
||||
let Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry);
|
||||
Telemetry.getHistogramById("SHUTDOWN_OK").add(!lastSessionCrashed);
|
||||
|
||||
// set the startup type
|
||||
if (lastSessionCrashed && resumeFromCrash)
|
||||
this._sessionType = Ci.nsISessionStartup.RECOVER_SESSION;
|
||||
|
@ -61,3 +61,4 @@ HISTOGRAM(GLUESTARTUP_HARD_FAULTS, 1, 500, 12, EXPONENTIAL, "Hard faults count a
|
||||
HISTOGRAM(HARD_PAGE_FAULTS, 8, 64 * 1024, 13, EXPONENTIAL, "Hard page faults (since last telemetry ping)")
|
||||
#endif
|
||||
HISTOGRAM(ZIPARCHIVE_CRC, 0, 1, 2, BOOLEAN, "Zip item CRC check pass")
|
||||
HISTOGRAM(SHUTDOWN_OK, 0, 1, 2, BOOLEAN, "Did the browser start after a successful shutdown")
|
||||
|
Loading…
x
Reference in New Issue
Block a user