Bug 1174612 - Consolidate MEMORY STAT messages into a single line. r=chmanchester

This commit is contained in:
Birunthan Mohanathas 2015-06-15 12:27:35 -07:00
Родитель 8f750a75b2
Коммит e95d967ecc
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -66,6 +66,7 @@ MemoryStats.dump = function (testNumber,
var mrm = MemoryStats._getService("@mozilla.org/memory-reporter-manager;1",
"nsIMemoryReporterManager");
let statMessage = "";
for (var stat in MemoryStats._hasMemoryStatistics) {
var supported = MemoryStats._hasMemoryStatistics[stat];
var firstAccess = false;
@ -80,11 +81,15 @@ MemoryStats.dump = function (testNumber,
MemoryStats._hasMemoryStatistics[stat] = supported;
}
if (supported == MEM_STAT_SUPPORTED) {
info("MEMORY STAT " + stat + " after test: " + mrm[stat]);
let sizeInMB = Math.round(mrm[stat] / (1024 * 1024));
statMessage += " | " + stat + " " + sizeInMB + "MB";
} else if (firstAccess) {
info("MEMORY STAT " + stat + " not supported in this build configuration.");
}
}
if (statMessage.length > 0) {
info("MEMORY STAT" + statMessage);
}
if (dumpAboutMemory) {
var basename = "about-memory-" + testNumber + ".json.gz";