@memlab/heap-analysis 1.0.34 → 1.0.35
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.
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type { AnalyzeSnapshotResult, HeapAnalysisOptions } from '../PluginUtils';
|
|
11
11
|
import { BaseOption } from '@memlab/core';
|
|
12
12
|
import BaseAnalysis from '../BaseAnalysis';
|
|
13
|
-
|
|
13
|
+
export default class ObjectContentAnalysis extends BaseAnalysis {
|
|
14
14
|
getCommandName(): string;
|
|
15
15
|
/** @internal */
|
|
16
16
|
getDescription(): string;
|
|
@@ -26,5 +26,4 @@ declare class GlobalVariableAnalysis extends BaseAnalysis {
|
|
|
26
26
|
/** @internal */
|
|
27
27
|
private getObjectReferrerEdges;
|
|
28
28
|
}
|
|
29
|
-
export default GlobalVariableAnalysis;
|
|
30
29
|
//# sourceMappingURL=ObjectContentAnalysis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectContentAnalysis.d.ts","sourceRoot":"","sources":["../../src/plugins/ObjectContentAnalysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAC,qBAAqB,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAG/E,OAAO,EAAC,UAAU,EAAoC,MAAM,cAAc,CAAC;AAG3E,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAI3C,
|
|
1
|
+
{"version":3,"file":"ObjectContentAnalysis.d.ts","sourceRoot":"","sources":["../../src/plugins/ObjectContentAnalysis.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAC,qBAAqB,EAAE,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AAG/E,OAAO,EAAC,UAAU,EAAoC,MAAM,cAAc,CAAC;AAG3E,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,YAAY;IAC7D,cAAc,IAAI,MAAM;IAIxB,gBAAgB;IAChB,cAAc,IAAI,MAAM;IAIxB,gBAAgB;IAChB,UAAU,IAAI,UAAU,EAAE;IAI1B,gBAAgB;IACV,OAAO,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB1D,OAAO,CAAC,KAAK;IA8Bb,gBAAgB;IACH,2BAA2B,CACtC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,qBAAqB,CAAC;IAQjC,gBAAgB;IAChB,OAAO,CAAC,mBAAmB;IAY3B,gBAAgB;IAChB,OAAO,CAAC,sBAAsB;CAW/B"}
|
|
@@ -28,7 +28,7 @@ const HeapAnalysisSnapshotFileOption_1 = __importDefault(require("../options/Hea
|
|
|
28
28
|
const BaseAnalysis_1 = __importDefault(require("../BaseAnalysis"));
|
|
29
29
|
const PluginUtils_1 = __importDefault(require("../PluginUtils"));
|
|
30
30
|
const HeapAnalysisOutputOption_1 = __importDefault(require("../options/HeapAnalysisOutputOption"));
|
|
31
|
-
class
|
|
31
|
+
class ObjectContentAnalysis extends BaseAnalysis_1.default {
|
|
32
32
|
getCommandName() {
|
|
33
33
|
return 'object';
|
|
34
34
|
}
|
|
@@ -43,12 +43,15 @@ class GlobalVariableAnalysis extends BaseAnalysis_1.default {
|
|
|
43
43
|
/** @internal */
|
|
44
44
|
process(options) {
|
|
45
45
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
const snapshot = yield PluginUtils_1.default.loadHeapSnapshot(options);
|
|
47
46
|
const nodeId = core_1.config.focusFiberNodeId;
|
|
47
|
+
if (nodeId < 0) {
|
|
48
|
+
core_1.utils.haltOrThrow('Specify an object by --node-id');
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const snapshot = yield PluginUtils_1.default.loadHeapSnapshot(options);
|
|
48
52
|
const node = snapshot.getNodeById(nodeId);
|
|
49
53
|
if (!node) {
|
|
50
|
-
core_1.
|
|
51
|
-
core_1.info.lowLevel(`Specify an object by --node-id`);
|
|
54
|
+
core_1.utils.haltOrThrow(`Object @${nodeId} is not found.`);
|
|
52
55
|
return;
|
|
53
56
|
}
|
|
54
57
|
if (core_1.config.outputFormat === core_1.OutputFormat.Json) {
|
|
@@ -113,4 +116,4 @@ class GlobalVariableAnalysis extends BaseAnalysis_1.default {
|
|
|
113
116
|
return ret;
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
|
-
exports.default =
|
|
119
|
+
exports.default = ObjectContentAnalysis;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memlab/heap-analysis",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "heap analysis plugins for memlab",
|
|
6
6
|
"author": "Liang Gong <lgong@fb.com>",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"LICENSE"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@memlab/core": "^1.1.
|
|
24
|
-
"@memlab/e2e": "^1.0.
|
|
23
|
+
"@memlab/core": "^1.1.38",
|
|
24
|
+
"@memlab/e2e": "^1.0.38",
|
|
25
25
|
"ansi": "^0.3.1",
|
|
26
26
|
"babar": "^0.2.0",
|
|
27
27
|
"chalk": "^4.0.0",
|