зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1462564 - Remove memory DAMP tests. r=yulia
MozReview-Commit-ID: BWXyPnriTcR --HG-- extra : rebase_source : 7cdc45bc1e599b5fcbc0a0c375338e63ce59512e
This commit is contained in:
Родитель
0a90b7dd57
Коммит
06d70b4e2c
|
@ -49,10 +49,6 @@ window.DAMP_TESTS = [
|
||||||
name: "simple.netmonitor",
|
name: "simple.netmonitor",
|
||||||
path: "netmonitor/simple.js",
|
path: "netmonitor/simple.js",
|
||||||
description: "Measure open/close toolbox on network monitor panel against simple document"
|
description: "Measure open/close toolbox on network monitor panel against simple document"
|
||||||
}, {
|
|
||||||
name: "simple.memory",
|
|
||||||
path: "memory/simple.js",
|
|
||||||
description: "Measure open/close toolbox on memory panel and save/read heap snapshot against simple document"
|
|
||||||
},
|
},
|
||||||
// Run all tests against "complicated" document
|
// Run all tests against "complicated" document
|
||||||
{
|
{
|
||||||
|
@ -79,10 +75,6 @@ window.DAMP_TESTS = [
|
||||||
name: "complicated.netmonitor",
|
name: "complicated.netmonitor",
|
||||||
path: "netmonitor/complicated.js",
|
path: "netmonitor/complicated.js",
|
||||||
description: "Measure open/close toolbox on network monitor panel against complicated document"
|
description: "Measure open/close toolbox on network monitor panel against complicated document"
|
||||||
}, {
|
|
||||||
name: "complicated.memory",
|
|
||||||
path: "memory/complicated.js",
|
|
||||||
description: "Measure open/close toolbox on memory panel and save/read heap snapshot against complicated document"
|
|
||||||
},
|
},
|
||||||
// Run all tests against a document specific to each tool
|
// Run all tests against a document specific to each tool
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
const { openToolboxAndLog, closeToolboxAndLog, reloadPageAndLog, testSetup,
|
|
||||||
testTeardown, COMPLICATED_URL } = require("../head");
|
|
||||||
const { saveHeapSnapshot, readHeapSnapshot, takeCensus } = require("./memory-helpers");
|
|
||||||
|
|
||||||
module.exports = async function() {
|
|
||||||
await testSetup(COMPLICATED_URL);
|
|
||||||
|
|
||||||
const toolbox = await openToolboxAndLog("complicated.memory", "memory");
|
|
||||||
await reloadPageAndLog("complicated.memory", toolbox);
|
|
||||||
|
|
||||||
let heapSnapshotFilePath = await saveHeapSnapshot("complicated");
|
|
||||||
let snapshot = await readHeapSnapshot("complicated", heapSnapshotFilePath);
|
|
||||||
await takeCensus("complicated", snapshot);
|
|
||||||
|
|
||||||
await closeToolboxAndLog("complicated.memory", toolbox);
|
|
||||||
await testTeardown();
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
const { getToolbox, runTest } = require("../head");
|
|
||||||
|
|
||||||
exports.saveHeapSnapshot = async function(label) {
|
|
||||||
let toolbox = getToolbox();
|
|
||||||
let panel = toolbox.getCurrentPanel();
|
|
||||||
let memoryFront = panel.panelWin.gFront;
|
|
||||||
|
|
||||||
let test = runTest(label + ".saveHeapSnapshot");
|
|
||||||
let heapSnapshotFilePath = await memoryFront.saveHeapSnapshot();
|
|
||||||
test.done();
|
|
||||||
|
|
||||||
return heapSnapshotFilePath;
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.readHeapSnapshot = function(label, snapshotFilePath) {
|
|
||||||
const ChromeUtils = require("ChromeUtils");
|
|
||||||
let test = runTest(label + ".readHeapSnapshot");
|
|
||||||
let snapshot = ChromeUtils.readHeapSnapshot(snapshotFilePath);
|
|
||||||
test.done();
|
|
||||||
|
|
||||||
return Promise.resolve(snapshot);
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.takeCensus = function(label, snapshot) {
|
|
||||||
let test = runTest("complicated.takeCensus");
|
|
||||||
snapshot.takeCensus({
|
|
||||||
breakdown: {
|
|
||||||
by: "coarseType",
|
|
||||||
objects: {
|
|
||||||
by: "objectClass",
|
|
||||||
then: { by: "count", bytes: true, count: true },
|
|
||||||
other: { by: "count", bytes: true, count: true }
|
|
||||||
},
|
|
||||||
strings: {
|
|
||||||
by: "internalType",
|
|
||||||
then: { by: "count", bytes: true, count: true }
|
|
||||||
},
|
|
||||||
scripts: {
|
|
||||||
by: "internalType",
|
|
||||||
then: { by: "count", bytes: true, count: true }
|
|
||||||
},
|
|
||||||
other: {
|
|
||||||
by: "internalType",
|
|
||||||
then: { by: "count", bytes: true, count: true }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
test.done();
|
|
||||||
|
|
||||||
return Promise.resolve();
|
|
||||||
};
|
|
|
@ -1,24 +0,0 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
const { openToolboxAndLog, closeToolboxAndLog, reloadPageAndLog, testSetup,
|
|
||||||
testTeardown, SIMPLE_URL } = require("../head");
|
|
||||||
const { saveHeapSnapshot, readHeapSnapshot, takeCensus } = require("./memory-helpers");
|
|
||||||
|
|
||||||
module.exports = async function() {
|
|
||||||
await testSetup(SIMPLE_URL);
|
|
||||||
|
|
||||||
const toolbox = await openToolboxAndLog("simple.memory", "memory");
|
|
||||||
await reloadPageAndLog("simple.memory", toolbox);
|
|
||||||
|
|
||||||
let heapSnapshotFilePath = await saveHeapSnapshot("simple");
|
|
||||||
let snapshot = await readHeapSnapshot("simple", heapSnapshotFilePath);
|
|
||||||
await takeCensus("simple", snapshot);
|
|
||||||
|
|
||||||
await closeToolboxAndLog("simple.memory", toolbox);
|
|
||||||
await testTeardown();
|
|
||||||
};
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче