Bug 789975 - gather telemetry on how long memory reporters take during telemetry; r=vdjeric

This commit is contained in:
Nathan Froyd 2012-12-07 18:46:38 -05:00
parent 3827142689
commit 18b8f5790a
2 changed files with 9 additions and 0 deletions

View File

@ -2487,5 +2487,11 @@
"high": "5000",
"n_buckets": 15,
"description": "Time (ms) it takes to figure out extension last modified time"
},
"TELEMETRY_MEMORY_REPORTER_MS": {
"kind": "exponential",
"high": "5000",
"n_buckets": 10,
"description": "Time (ms) it takes to run memory reporters when sending a telemetry ping"
}
}

View File

@ -423,6 +423,8 @@ TelemetryPing.prototype = {
return;
}
let histogram = Telemetry.getHistogramById("TELEMETRY_MEMORY_REPORTER_MS");
let startTime = new Date();
let e = mgr.enumerateReporters();
while (e.hasMoreElements()) {
let mr = e.getNext().QueryInterface(Ci.nsIMemoryReporter);
@ -439,6 +441,7 @@ TelemetryPing.prototype = {
catch (e) {
}
}
histogram.add(new Date() - startTime);
},
handleMemoryReport: function handleMemoryReport(id, path, units, amount) {