@memlab/core 1.1.18 → 1.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/parser/StringNode.test.js +12 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +6 -3
- package/dist/lib/Config.d.ts +2 -0
- package/dist/lib/Config.js +4 -0
- package/dist/lib/FileManager.d.ts +5 -0
- package/dist/lib/FileManager.js +78 -7
- package/dist/lib/HeapAnalyzer.d.ts +15 -8
- package/dist/lib/HeapAnalyzer.js +106 -98
- package/dist/lib/Types.d.ts +93 -0
- package/dist/lib/Utils.d.ts +9 -3
- package/dist/lib/Utils.js +37 -7
- package/dist/lib/charts/MemoryBarChart.d.ts +20 -0
- package/dist/lib/charts/MemoryBarChart.js +116 -0
- package/dist/lib/heap-data/HeapEdge.d.ts +3 -1
- package/dist/lib/heap-data/HeapEdge.js +13 -0
- package/dist/lib/heap-data/HeapLocation.d.ts +3 -1
- package/dist/lib/heap-data/HeapLocation.js +14 -0
- package/dist/lib/heap-data/HeapNode.d.ts +6 -1
- package/dist/lib/heap-data/HeapNode.js +46 -0
- package/dist/lib/heap-data/HeapSnapshot.d.ts +3 -1
- package/dist/lib/heap-data/HeapSnapshot.js +7 -0
- package/dist/lib/heap-data/HeapStringNode.d.ts +2 -1
- package/dist/lib/heap-data/HeapStringNode.js +5 -0
- package/dist/trace-cluster/TraceBucket.d.ts +11 -1
- package/dist/trace-cluster/TraceBucket.js +146 -1
- package/dist/trace-cluster/TraceElement.d.ts +6 -1
- package/dist/trace-cluster/TraceElement.js +33 -0
- package/dist/trace-cluster/strategies/TraceSimilarityStrategy.js +9 -0
- package/package.json +1 -1
- package/static/visit-order-single-snapshot.json +19 -0
|
@@ -12,6 +12,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const Config_1 = __importDefault(require("../../lib/Config"));
|
|
16
|
+
const Console_1 = __importDefault(require("../../lib/Console"));
|
|
15
17
|
const ClusterUtils_1 = __importDefault(require("../ClusterUtils"));
|
|
16
18
|
// cluster by putting similar traces together
|
|
17
19
|
class TraceSimilarityStrategy {
|
|
@@ -41,6 +43,13 @@ class TraceSimilarityStrategy {
|
|
|
41
43
|
// checking new clusters
|
|
42
44
|
outer: for (let i = 0; i < newTraces.length; ++i) {
|
|
43
45
|
const traceToCheck = newTraces[i];
|
|
46
|
+
// use an odd number as the divider. If we choose 10 as the divider,
|
|
47
|
+
// when updating the progress indicator, the final digit always ends
|
|
48
|
+
// with a zero, which can appear strange and not representative of
|
|
49
|
+
// the actual progress.
|
|
50
|
+
if (!Config_1.default.isContinuousTest && i % 17 === 0) {
|
|
51
|
+
Console_1.default.overwrite(`clustering trace: ${i} / ${newTraces.length}`);
|
|
52
|
+
}
|
|
44
53
|
for (let j = 0; j < clusters.length; ++j) {
|
|
45
54
|
const repTrace = clusters[j][0];
|
|
46
55
|
if (TraceSimilarityStrategy.isSimilarTrace(repTrace, traceToCheck)) {
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "target",
|
|
4
|
+
"url": "",
|
|
5
|
+
"snapshot": true,
|
|
6
|
+
"screenshot": false,
|
|
7
|
+
"type": "target",
|
|
8
|
+
"idx": 1
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "final",
|
|
12
|
+
"url": "",
|
|
13
|
+
"delay": 10000,
|
|
14
|
+
"snapshot": true,
|
|
15
|
+
"screenshot": false,
|
|
16
|
+
"type": "final",
|
|
17
|
+
"idx": 2
|
|
18
|
+
}
|
|
19
|
+
]
|