Bug 666667 - Update TelemetryHistograms.h to indicate that memory is reported in KB, not MB, and update memory reporters' names. r=taras

This commit is contained in:
Justin Lebar 2011-06-27 13:03:28 -04:00
Родитель 7f93479d1f
Коммит 4caff5330c
2 изменённых файлов: 9 добавлений и 12 удалений

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

@ -44,12 +44,12 @@
*
*/
HISTOGRAM(CYCLE_COLLECTOR, 1, 10000, 50, EXPONENTIAL, "Time(ms) spent on cycle collection")
HISTOGRAM(TELEMETRY_PING, 1, 3000, 10, EXPONENTIAL, "Time(ms) taken to submit telemetry info")
HISTOGRAM(TELEMETRY_SUCCESS, 0, 1, 2, BOOLEAN, "Success(No, Yes) rate of telemetry submissions")
HISTOGRAM(MEMORY_JS_GC_HEAP, 1024, 512 * 1024, 10, EXPONENTIAL, "Memory(MB) used by the JavaScript GC")
HISTOGRAM(MEMORY_RESIDENT, 32 * 1024, 1024 * 1024, 10, EXPONENTIAL, "Resident memory(MB) reported by OS")
HISTOGRAM(MEMORY_LAYOUT_ALL, 1024, 64 * 1024, 10, EXPONENTIAL, "Memory(MB) reported used by layout")
HISTOGRAM(CYCLE_COLLECTOR, 1, 10000, 50, EXPONENTIAL, "Time spent on one cycle collection (ms)")
HISTOGRAM(TELEMETRY_PING, 1, 3000, 10, EXPONENTIAL, "Time taken to submit telemetry info (ms)")
HISTOGRAM(TELEMETRY_SUCCESS, 0, 1, 2, BOOLEAN, "Successful telemetry submission")
HISTOGRAM(MEMORY_JS_GC_HEAP, 1024, 512 * 1024, 10, EXPONENTIAL, "Memory used by the garbage-collected JavaScript heap (KB)")
HISTOGRAM(MEMORY_RESIDENT, 32 * 1024, 1024 * 1024, 10, EXPONENTIAL, "Resident memory size (KB)")
HISTOGRAM(MEMORY_LAYOUT_ALL, 1024, 64 * 1024, 10, EXPONENTIAL, "Memory used by layout (KB)")
#if defined(XP_WIN)
HISTOGRAM(EARLY_GLUESTARTUP_READ_OPS, 1, 100, 12, LINEAR, "ProcessIoCounters.ReadOperationCount before glue startup")
HISTOGRAM(EARLY_GLUESTARTUP_READ_TRANSFER, 1, 50 * 1024, 12, EXPONENTIAL, "ProcessIoCounters.ReadTransferCount before glue startup (KB)")

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

@ -210,17 +210,14 @@ TelemetryPing.prototype = {
continue;
}
let name, val;
let val;
if (mr.units == Ci.nsIMemoryReporter.UNITS_BYTES) {
name = "Memory:" + mr.path + " + (KB)";
val = Math.floor(mr.amount / 1024);
}
else if (mr.units == Ci.nsIMemoryReporter.UNITS_COUNT) {
// If the reporter gives us a count, we'll report the difference in its
// value between now and our previous ping.
name = "Memory:" + mr.path;
// Read mr.amount just once so our arithmetic is consistent.
let curVal = mr.amount;
let prevVal = this._prevValues[mr.path];
@ -239,10 +236,10 @@ TelemetryPing.prototype = {
continue;
}
let h = this._histograms[name];
let h = this._histograms[mr.name];
if (!h) {
h = Telemetry.getHistogramById(id);
this._histograms[name] = h;
this._histograms[mr.name] = h;
}
h.add(val);
}