mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 962808 - [Session Restore] Better telemetry for _writeState. r=ttaubert
This commit is contained in:
parent
b646d7d863
commit
86f91eda18
@ -242,7 +242,7 @@ let SessionSaverInternal = {
|
||||
* Write the given state object to disk.
|
||||
*/
|
||||
_writeState: function (state) {
|
||||
stopWatchStart("SERIALIZE_DATA_MS", "SERIALIZE_DATA_LONGEST_OP_MS");
|
||||
stopWatchStart("SERIALIZE_DATA_MS", "SERIALIZE_DATA_LONGEST_OP_MS", "WRITE_STATE_LONGEST_OP_MS");
|
||||
let data = JSON.stringify(state);
|
||||
stopWatchFinish("SERIALIZE_DATA_MS", "SERIALIZE_DATA_LONGEST_OP_MS");
|
||||
|
||||
@ -251,6 +251,7 @@ let SessionSaverInternal = {
|
||||
|
||||
// Don't touch the file if an observer has deleted all state data.
|
||||
if (!data) {
|
||||
stopWatchCancel("WRITE_STATE_LONGEST_OP_MS");
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
@ -263,10 +264,16 @@ let SessionSaverInternal = {
|
||||
// Write (atomically) to a session file, using a tmp file. Once the session
|
||||
// file is successfully updated, save the time stamp of the last save and
|
||||
// notify the observers.
|
||||
return SessionFile.write(data).then(() => {
|
||||
stopWatchStart("SEND_SERIALIZED_STATE_LONGEST_OP_MS");
|
||||
let promise = SessionFile.write(data);
|
||||
stopWatchFinish("WRITE_STATE_LONGEST_OP_MS",
|
||||
"SEND_SERIALIZED_STATE_LONGEST_OP_MS");
|
||||
promise = promise.then(() => {
|
||||
this.updateLastSaveTime();
|
||||
notify(null, "sessionstore-state-write-complete");
|
||||
}, console.error);
|
||||
|
||||
return promise;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -3317,6 +3317,22 @@
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Session restore: Time to read the session data from the file on disk (ms)"
|
||||
},
|
||||
"FX_SESSION_RESTORE_SEND_SERIALIZED_STATE_LONGEST_OP_MS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": "3000",
|
||||
"n_buckets": 10,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Session restore: Time spent on the main thread sending the session data off the main thread for writing (ms)"
|
||||
},
|
||||
"FX_SESSION_RESTORE_WRITE_STATE_LONGEST_OP_MS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": "3000",
|
||||
"n_buckets": 10,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Session restore: Time spent on the main thread serializing, broadcasting and sending the session data for writing (ms)"
|
||||
},
|
||||
"FX_SESSION_RESTORE_WRITE_FILE_MS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
|
Loading…
Reference in New Issue
Block a user