diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-22 17:32:39 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-22 17:32:39 -0500 |
commit | 4e2e9be6abed3225406b466099e397acc0f914d2 (patch) | |
tree | 023551018892b8e76ae80e63a08d9d6a27c21a77 /devtools/shared/heapsnapshot/tests/unit/test_census_diff_06.js | |
parent | a7888b8cf20691a4090715ab9b055ec3cb75f5e8 (diff) | |
download | UXP-4e2e9be6abed3225406b466099e397acc0f914d2.tar UXP-4e2e9be6abed3225406b466099e397acc0f914d2.tar.gz UXP-4e2e9be6abed3225406b466099e397acc0f914d2.tar.lz UXP-4e2e9be6abed3225406b466099e397acc0f914d2.tar.xz UXP-4e2e9be6abed3225406b466099e397acc0f914d2.zip |
Reclassify heapsnapshot and nsJSInspector as not part of devtools
This resolves Issue #316
Diffstat (limited to 'devtools/shared/heapsnapshot/tests/unit/test_census_diff_06.js')
-rw-r--r-- | devtools/shared/heapsnapshot/tests/unit/test_census_diff_06.js | 137 |
1 files changed, 0 insertions, 137 deletions
diff --git a/devtools/shared/heapsnapshot/tests/unit/test_census_diff_06.js b/devtools/shared/heapsnapshot/tests/unit/test_census_diff_06.js deleted file mode 100644 index 430ff8c9c..000000000 --- a/devtools/shared/heapsnapshot/tests/unit/test_census_diff_06.js +++ /dev/null @@ -1,137 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -// Test diffing census reports of a "complex" and "realistic" breakdown. - -const BREAKDOWN = { - by: "coarseType", - objects: { - by: "allocationStack", - then: { - by: "objectClass", - then: { by: "count", count: false, bytes: true }, - other: { by: "count", count: false, bytes: true } - }, - noStack: { - by: "objectClass", - then: { by: "count", count: false, bytes: true }, - other: { by: "count", count: false, bytes: true } - } - }, - strings: { - by: "internalType", - then: { by: "count", count: false, bytes: true } - }, - scripts: { - by: "internalType", - then: { by: "count", count: false, bytes: true } - }, - other: { - by: "internalType", - then: { by: "count", count: false, bytes: true } - }, -}; - -const stack1 = saveStack(); -const stack2 = saveStack(); -const stack3 = saveStack(); - -const REPORT1 = { - objects: new Map([ - [stack1, { Function: { bytes: 1 }, - Object: { bytes: 2 }, - other: { bytes: 0 }, - }], - [stack2, { Array: { bytes: 3 }, - Date: { bytes: 4 }, - other: { bytes: 0 }, - }], - ["noStack", { Object: { bytes: 3 }}], - ]), - strings: { - JSAtom: { bytes: 10 }, - JSLinearString: { bytes: 5 }, - }, - scripts: { - JSScript: { bytes: 1 }, - "js::jit::JitCode": { bytes: 2 }, - }, - other: { - "mozilla::dom::Thing": { bytes: 1 }, - } -}; - -const REPORT2 = { - objects: new Map([ - [stack2, { Array: { bytes: 1 }, - Date: { bytes: 2 }, - other: { bytes: 3 }, - }], - [stack3, { Function: { bytes: 1 }, - Object: { bytes: 2 }, - other: { bytes: 0 }, - }], - ["noStack", { Object: { bytes: 3 }}], - ]), - strings: { - JSAtom: { bytes: 5 }, - JSLinearString: { bytes: 10 }, - }, - scripts: { - JSScript: { bytes: 2 }, - "js::LazyScript": { bytes: 42 }, - "js::jit::JitCode": { bytes: 1 }, - }, - other: { - "mozilla::dom::OtherThing": { bytes: 1 }, - } -}; - -const EXPECTED = { - "objects": new Map([ - [stack1, { Function: { bytes: -1 }, - Object: { bytes: -2 }, - other: { bytes: 0 }, - }], - [stack2, { Array: { bytes: -2 }, - Date: { bytes: -2 }, - other: { bytes: 3 }, - }], - [stack3, { Function: { bytes: 1 }, - Object: { bytes: 2 }, - other: { bytes: 0 }, - }], - ["noStack", { Object: { bytes: 0 }}], - ]), - "scripts": { - "JSScript": { - "bytes": 1 - }, - "js::jit::JitCode": { - "bytes": -1 - }, - "js::LazyScript": { - "bytes": 42 - } - }, - "strings": { - "JSAtom": { - "bytes": -5 - }, - "JSLinearString": { - "bytes": 5 - } - }, - "other": { - "mozilla::dom::Thing": { - "bytes": -1 - }, - "mozilla::dom::OtherThing": { - "bytes": 1 - } - } -}; - -function run_test() { - assertDiff(BREAKDOWN, REPORT1, REPORT2, EXPECTED); -} |