meminsight-core-publish 1.0.0
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/Index.d.ts +21 -0
- package/dist/Index.d.ts.map +1 -0
- package/dist/Index.js +65 -0
- package/dist/analyzer/AnalysisInfo.d.ts +112 -0
- package/dist/analyzer/AnalysisInfo.d.ts.map +1 -0
- package/dist/analyzer/AnalysisInfo.js +217 -0
- package/dist/analyzer/ArkAnalyzer.d.ts +30 -0
- package/dist/analyzer/ArkAnalyzer.d.ts.map +1 -0
- package/dist/analyzer/ArkAnalyzer.js +52 -0
- package/dist/analyzer/ArkCmpCfg.d.ts +15 -0
- package/dist/analyzer/ArkCmpCfg.d.ts.map +1 -0
- package/dist/analyzer/ArkCmpCfg.js +15 -0
- package/dist/analyzer/ArkCompareAnalyzer.d.ts +52 -0
- package/dist/analyzer/ArkCompareAnalyzer.d.ts.map +1 -0
- package/dist/analyzer/ArkCompareAnalyzer.js +144 -0
- package/dist/analyzer/ArkLeakAnalyzer.d.ts +14 -0
- package/dist/analyzer/ArkLeakAnalyzer.d.ts.map +1 -0
- package/dist/analyzer/ArkLeakAnalyzer.js +18 -0
- package/dist/analyzer/ArkSerializer.d.ts +18 -0
- package/dist/analyzer/ArkSerializer.d.ts.map +1 -0
- package/dist/analyzer/ArkSerializer.js +155 -0
- package/dist/analyzer/ArkStatAnalyzer.d.ts +56 -0
- package/dist/analyzer/ArkStatAnalyzer.d.ts.map +1 -0
- package/dist/analyzer/ArkStatAnalyzer.js +224 -0
- package/dist/analyzer/ArkStatCfg.d.ts +42 -0
- package/dist/analyzer/ArkStatCfg.d.ts.map +1 -0
- package/dist/analyzer/ArkStatCfg.js +42 -0
- package/dist/analyzer/ArkTracePath.d.ts +90 -0
- package/dist/analyzer/ArkTracePath.d.ts.map +1 -0
- package/dist/analyzer/ArkTracePath.js +245 -0
- package/dist/analyzer/ArkTracer.d.ts +17 -0
- package/dist/analyzer/ArkTracer.d.ts.map +1 -0
- package/dist/analyzer/ArkTracer.js +27 -0
- package/dist/analyzer/ArkXAnalyzer.d.ts +69 -0
- package/dist/analyzer/ArkXAnalyzer.d.ts.map +1 -0
- package/dist/analyzer/ArkXAnalyzer.js +616 -0
- package/dist/analyzer/IAnalyzer.d.ts +25 -0
- package/dist/analyzer/IAnalyzer.d.ts.map +1 -0
- package/dist/analyzer/IAnalyzer.js +2 -0
- package/dist/file/FileReader.d.ts +51 -0
- package/dist/file/FileReader.d.ts.map +1 -0
- package/dist/file/FileReader.js +110 -0
- package/dist/file/FileService.d.ts +23 -0
- package/dist/file/FileService.d.ts.map +1 -0
- package/dist/file/FileService.js +65 -0
- package/dist/file/FileWriter.d.ts +82 -0
- package/dist/file/FileWriter.d.ts.map +1 -0
- package/dist/file/FileWriter.js +160 -0
- package/dist/report/Reporter.d.ts +27 -0
- package/dist/report/Reporter.d.ts.map +1 -0
- package/dist/report/Reporter.js +61 -0
- package/dist/report/templates/template.d.ts +3 -0
- package/dist/report/templates/template.d.ts.map +1 -0
- package/dist/report/templates/template.js +106 -0
- package/dist/shell/DeviceShell.d.ts +96 -0
- package/dist/shell/DeviceShell.d.ts.map +1 -0
- package/dist/shell/DeviceShell.js +180 -0
- package/dist/shell/Shell.d.ts +52 -0
- package/dist/shell/Shell.d.ts.map +1 -0
- package/dist/shell/Shell.js +79 -0
- package/dist/types/Constants.d.ts +15 -0
- package/dist/types/Constants.d.ts.map +1 -0
- package/dist/types/Constants.js +18 -0
- package/dist/types/LeakTypes.d.ts +18 -0
- package/dist/types/LeakTypes.d.ts.map +1 -0
- package/dist/types/LeakTypes.js +2 -0
- package/dist/types/OhosTypes.d.ts +74 -0
- package/dist/types/OhosTypes.d.ts.map +1 -0
- package/dist/types/OhosTypes.js +83 -0
- package/dist/utils/Common.d.ts +14 -0
- package/dist/utils/Common.d.ts.map +1 -0
- package/dist/utils/Common.js +38 -0
- package/dist/utils/Finder.d.ts +163 -0
- package/dist/utils/Finder.d.ts.map +1 -0
- package/dist/utils/Finder.js +355 -0
- package/dist/utils/Loader.d.ts +30 -0
- package/dist/utils/Loader.d.ts.map +1 -0
- package/dist/utils/Loader.js +71 -0
- package/dist/utils/Log.d.ts +140 -0
- package/dist/utils/Log.d.ts.map +1 -0
- package/dist/utils/Log.js +177 -0
- package/dist/utils/Output.d.ts +126 -0
- package/dist/utils/Output.d.ts.map +1 -0
- package/dist/utils/Output.js +225 -0
- package/package.json +61 -0
package/dist/Index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { IDataInfo, AppInfo, DeviceInfo, HeapFileInfo, HeapInfos, OsInfo, UrlInfo } from './types/OhosTypes';
|
|
2
|
+
export { ILogger, ILoggable, Log, LogType } from './utils/Log';
|
|
3
|
+
export { Loader } from './utils/Loader';
|
|
4
|
+
export { Finder } from './utils/Finder';
|
|
5
|
+
export { IOutput, OutputType, OutputCfg, OutputFactory, ConsoleData, ConsoleTableData, TextData, JsonData, HtmlData } from './utils/Output';
|
|
6
|
+
export { IReader, BaseReader, JsonReader } from './file/FileReader';
|
|
7
|
+
export { IWriter, BaseWriter, TextWriter, JsonWriter, HtmlWriter } from './file/FileWriter';
|
|
8
|
+
export { IAnalyzer } from './analyzer/IAnalyzer';
|
|
9
|
+
export { ArkAnalyzer } from './analyzer/ArkAnalyzer';
|
|
10
|
+
export { ArkStatAnalyzer } from './analyzer/ArkStatAnalyzer';
|
|
11
|
+
export { ArkCompareAnalyzer } from './analyzer/ArkCompareAnalyzer';
|
|
12
|
+
export { ArkLeakAnalyzer } from './analyzer/ArkLeakAnalyzer';
|
|
13
|
+
export { ArkStatCfg, defaultArkStatCfg } from './analyzer/ArkStatCfg';
|
|
14
|
+
export { ArkCmpCfg, defaultArkCmpCfg } from './analyzer/ArkCmpCfg';
|
|
15
|
+
export { ArkXAnalyzer } from './analyzer/ArkXAnalyzer';
|
|
16
|
+
export { ArkTracePathItem, ArkNodeTracePath, ArkNodePathIndexes, ArkNodes, ArkNodesMap } from './analyzer/ArkTracePath';
|
|
17
|
+
export { ArkTracer, ArkTracePathFilter, ArkTracePathOutput } from './analyzer/ArkTracer';
|
|
18
|
+
export { ArkSerializer } from './analyzer/ArkSerializer';
|
|
19
|
+
export { IShell, ShellArgs, Shell } from './shell/Shell';
|
|
20
|
+
export { DeviceShell } from './shell/DeviceShell';
|
|
21
|
+
//# sourceMappingURL=Index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Index.d.ts","sourceRoot":"","sources":["../src/Index.ts"],"names":[],"mappings":"AACA,OAAO,EACH,SAAS,EACT,OAAO,EACP,UAAU,EACV,YAAY,EACZ,SAAS,EACT,MAAM,EACN,OAAO,EACV,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EACH,OAAO,EACP,UAAU,EACV,SAAS,EACT,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACX,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG5F,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/Index.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceShell = exports.Shell = exports.ShellArgs = exports.ArkSerializer = exports.ArkTracer = exports.ArkNodesMap = exports.ArkNodes = exports.ArkNodePathIndexes = exports.ArkNodeTracePath = exports.ArkXAnalyzer = exports.defaultArkCmpCfg = exports.defaultArkStatCfg = exports.ArkLeakAnalyzer = exports.ArkCompareAnalyzer = exports.ArkStatAnalyzer = exports.ArkAnalyzer = exports.HtmlWriter = exports.JsonWriter = exports.TextWriter = exports.BaseWriter = exports.JsonReader = exports.BaseReader = exports.HtmlData = exports.JsonData = exports.TextData = exports.ConsoleTableData = exports.ConsoleData = exports.OutputFactory = exports.OutputType = exports.Finder = exports.Loader = exports.LogType = exports.Log = exports.UrlInfo = exports.OsInfo = exports.HeapInfos = exports.HeapFileInfo = exports.DeviceInfo = exports.AppInfo = void 0;
|
|
4
|
+
// types
|
|
5
|
+
var OhosTypes_1 = require("./types/OhosTypes");
|
|
6
|
+
Object.defineProperty(exports, "AppInfo", { enumerable: true, get: function () { return OhosTypes_1.AppInfo; } });
|
|
7
|
+
Object.defineProperty(exports, "DeviceInfo", { enumerable: true, get: function () { return OhosTypes_1.DeviceInfo; } });
|
|
8
|
+
Object.defineProperty(exports, "HeapFileInfo", { enumerable: true, get: function () { return OhosTypes_1.HeapFileInfo; } });
|
|
9
|
+
Object.defineProperty(exports, "HeapInfos", { enumerable: true, get: function () { return OhosTypes_1.HeapInfos; } });
|
|
10
|
+
Object.defineProperty(exports, "OsInfo", { enumerable: true, get: function () { return OhosTypes_1.OsInfo; } });
|
|
11
|
+
Object.defineProperty(exports, "UrlInfo", { enumerable: true, get: function () { return OhosTypes_1.UrlInfo; } });
|
|
12
|
+
// utils
|
|
13
|
+
var Log_1 = require("./utils/Log");
|
|
14
|
+
Object.defineProperty(exports, "Log", { enumerable: true, get: function () { return Log_1.Log; } });
|
|
15
|
+
Object.defineProperty(exports, "LogType", { enumerable: true, get: function () { return Log_1.LogType; } });
|
|
16
|
+
var Loader_1 = require("./utils/Loader");
|
|
17
|
+
Object.defineProperty(exports, "Loader", { enumerable: true, get: function () { return Loader_1.Loader; } });
|
|
18
|
+
var Finder_1 = require("./utils/Finder");
|
|
19
|
+
Object.defineProperty(exports, "Finder", { enumerable: true, get: function () { return Finder_1.Finder; } });
|
|
20
|
+
var Output_1 = require("./utils/Output");
|
|
21
|
+
Object.defineProperty(exports, "OutputType", { enumerable: true, get: function () { return Output_1.OutputType; } });
|
|
22
|
+
Object.defineProperty(exports, "OutputFactory", { enumerable: true, get: function () { return Output_1.OutputFactory; } });
|
|
23
|
+
Object.defineProperty(exports, "ConsoleData", { enumerable: true, get: function () { return Output_1.ConsoleData; } });
|
|
24
|
+
Object.defineProperty(exports, "ConsoleTableData", { enumerable: true, get: function () { return Output_1.ConsoleTableData; } });
|
|
25
|
+
Object.defineProperty(exports, "TextData", { enumerable: true, get: function () { return Output_1.TextData; } });
|
|
26
|
+
Object.defineProperty(exports, "JsonData", { enumerable: true, get: function () { return Output_1.JsonData; } });
|
|
27
|
+
Object.defineProperty(exports, "HtmlData", { enumerable: true, get: function () { return Output_1.HtmlData; } });
|
|
28
|
+
// file
|
|
29
|
+
var FileReader_1 = require("./file/FileReader");
|
|
30
|
+
Object.defineProperty(exports, "BaseReader", { enumerable: true, get: function () { return FileReader_1.BaseReader; } });
|
|
31
|
+
Object.defineProperty(exports, "JsonReader", { enumerable: true, get: function () { return FileReader_1.JsonReader; } });
|
|
32
|
+
var FileWriter_1 = require("./file/FileWriter");
|
|
33
|
+
Object.defineProperty(exports, "BaseWriter", { enumerable: true, get: function () { return FileWriter_1.BaseWriter; } });
|
|
34
|
+
Object.defineProperty(exports, "TextWriter", { enumerable: true, get: function () { return FileWriter_1.TextWriter; } });
|
|
35
|
+
Object.defineProperty(exports, "JsonWriter", { enumerable: true, get: function () { return FileWriter_1.JsonWriter; } });
|
|
36
|
+
Object.defineProperty(exports, "HtmlWriter", { enumerable: true, get: function () { return FileWriter_1.HtmlWriter; } });
|
|
37
|
+
var ArkAnalyzer_1 = require("./analyzer/ArkAnalyzer");
|
|
38
|
+
Object.defineProperty(exports, "ArkAnalyzer", { enumerable: true, get: function () { return ArkAnalyzer_1.ArkAnalyzer; } });
|
|
39
|
+
var ArkStatAnalyzer_1 = require("./analyzer/ArkStatAnalyzer");
|
|
40
|
+
Object.defineProperty(exports, "ArkStatAnalyzer", { enumerable: true, get: function () { return ArkStatAnalyzer_1.ArkStatAnalyzer; } });
|
|
41
|
+
var ArkCompareAnalyzer_1 = require("./analyzer/ArkCompareAnalyzer");
|
|
42
|
+
Object.defineProperty(exports, "ArkCompareAnalyzer", { enumerable: true, get: function () { return ArkCompareAnalyzer_1.ArkCompareAnalyzer; } });
|
|
43
|
+
var ArkLeakAnalyzer_1 = require("./analyzer/ArkLeakAnalyzer");
|
|
44
|
+
Object.defineProperty(exports, "ArkLeakAnalyzer", { enumerable: true, get: function () { return ArkLeakAnalyzer_1.ArkLeakAnalyzer; } });
|
|
45
|
+
var ArkStatCfg_1 = require("./analyzer/ArkStatCfg");
|
|
46
|
+
Object.defineProperty(exports, "defaultArkStatCfg", { enumerable: true, get: function () { return ArkStatCfg_1.defaultArkStatCfg; } });
|
|
47
|
+
var ArkCmpCfg_1 = require("./analyzer/ArkCmpCfg");
|
|
48
|
+
Object.defineProperty(exports, "defaultArkCmpCfg", { enumerable: true, get: function () { return ArkCmpCfg_1.defaultArkCmpCfg; } });
|
|
49
|
+
var ArkXAnalyzer_1 = require("./analyzer/ArkXAnalyzer");
|
|
50
|
+
Object.defineProperty(exports, "ArkXAnalyzer", { enumerable: true, get: function () { return ArkXAnalyzer_1.ArkXAnalyzer; } });
|
|
51
|
+
var ArkTracePath_1 = require("./analyzer/ArkTracePath");
|
|
52
|
+
Object.defineProperty(exports, "ArkNodeTracePath", { enumerable: true, get: function () { return ArkTracePath_1.ArkNodeTracePath; } });
|
|
53
|
+
Object.defineProperty(exports, "ArkNodePathIndexes", { enumerable: true, get: function () { return ArkTracePath_1.ArkNodePathIndexes; } });
|
|
54
|
+
Object.defineProperty(exports, "ArkNodes", { enumerable: true, get: function () { return ArkTracePath_1.ArkNodes; } });
|
|
55
|
+
Object.defineProperty(exports, "ArkNodesMap", { enumerable: true, get: function () { return ArkTracePath_1.ArkNodesMap; } });
|
|
56
|
+
var ArkTracer_1 = require("./analyzer/ArkTracer");
|
|
57
|
+
Object.defineProperty(exports, "ArkTracer", { enumerable: true, get: function () { return ArkTracer_1.ArkTracer; } });
|
|
58
|
+
var ArkSerializer_1 = require("./analyzer/ArkSerializer");
|
|
59
|
+
Object.defineProperty(exports, "ArkSerializer", { enumerable: true, get: function () { return ArkSerializer_1.ArkSerializer; } });
|
|
60
|
+
// shell
|
|
61
|
+
var Shell_1 = require("./shell/Shell");
|
|
62
|
+
Object.defineProperty(exports, "ShellArgs", { enumerable: true, get: function () { return Shell_1.ShellArgs; } });
|
|
63
|
+
Object.defineProperty(exports, "Shell", { enumerable: true, get: function () { return Shell_1.Shell; } });
|
|
64
|
+
var DeviceShell_1 = require("./shell/DeviceShell");
|
|
65
|
+
Object.defineProperty(exports, "DeviceShell", { enumerable: true, get: function () { return DeviceShell_1.DeviceShell; } });
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ReportData } from "../report/Reporter";
|
|
2
|
+
export interface IBaseInfo {
|
|
3
|
+
toReportData: () => ReportData;
|
|
4
|
+
}
|
|
5
|
+
export declare class ClassInfo {
|
|
6
|
+
className: string;
|
|
7
|
+
count: number;
|
|
8
|
+
retainedSize: number;
|
|
9
|
+
selfSize: number;
|
|
10
|
+
retainedSizeTotalHeapPercent: number;
|
|
11
|
+
selfSizeTotalHeapPercent: number;
|
|
12
|
+
retainedSizeTotalRetainedPercent: number;
|
|
13
|
+
selfSizeTotalSelfPercent: number;
|
|
14
|
+
toString(): string;
|
|
15
|
+
}
|
|
16
|
+
export declare class DistanceInfo {
|
|
17
|
+
objectNameOrType: string;
|
|
18
|
+
distance: number;
|
|
19
|
+
count: number;
|
|
20
|
+
retainedSize: number;
|
|
21
|
+
selfSize: number;
|
|
22
|
+
retainedSizeTotalHeapPercent: number;
|
|
23
|
+
selfSizeTotalHeapPercent: number;
|
|
24
|
+
retainedSizeTotalRetainedPercent: number;
|
|
25
|
+
selfSizeTotalSelfPercent: number;
|
|
26
|
+
toString(): string;
|
|
27
|
+
}
|
|
28
|
+
export declare class ShortestPathInfo {
|
|
29
|
+
shortestPathStr: string;
|
|
30
|
+
shortestPathIds: number[];
|
|
31
|
+
count: number;
|
|
32
|
+
retainedSize: number;
|
|
33
|
+
selfSize: number;
|
|
34
|
+
retainedSizeTotalHeapPercent: number;
|
|
35
|
+
selfSizeTotalHeapPercent: number;
|
|
36
|
+
retainedSizeTotalRetainedPercent: number;
|
|
37
|
+
selfSizeTotalSelfPercent: number;
|
|
38
|
+
toString(): string;
|
|
39
|
+
}
|
|
40
|
+
export declare class PropertyInfo {
|
|
41
|
+
propName: string;
|
|
42
|
+
propShortestPath: string;
|
|
43
|
+
count: number;
|
|
44
|
+
retainedSize: number;
|
|
45
|
+
selfSize: number;
|
|
46
|
+
retainedSizeTotalHeapPercent: number;
|
|
47
|
+
selfSizeTotalHeapPercent: number;
|
|
48
|
+
retainedSizeTotalRetainedPercent: number;
|
|
49
|
+
selfSizeTotalSelfPercent: number;
|
|
50
|
+
toString(): string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 分析数据节点
|
|
54
|
+
*/
|
|
55
|
+
declare abstract class BaseAnalysisInfo implements IBaseInfo {
|
|
56
|
+
name: string;
|
|
57
|
+
type: string;
|
|
58
|
+
desc: string;
|
|
59
|
+
scope: string;
|
|
60
|
+
totalHeapSize: number;
|
|
61
|
+
totalRetainedSize?: number;
|
|
62
|
+
totalSelfSize?: number;
|
|
63
|
+
totalCount?: number;
|
|
64
|
+
className?: string;
|
|
65
|
+
classInfos?: ClassInfo[];
|
|
66
|
+
distanceInfos?: DistanceInfo[];
|
|
67
|
+
shortestPathInfos?: ShortestPathInfo[];
|
|
68
|
+
propertyInfos?: PropertyInfo[];
|
|
69
|
+
protected getFeature(): string;
|
|
70
|
+
protected getMessage(): string[];
|
|
71
|
+
protected getColumns(): Map<string, string>;
|
|
72
|
+
protected getData(): Record<string, any>;
|
|
73
|
+
toReportData(): ReportData;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* 按类名聚合分析数据节点信息
|
|
77
|
+
*/
|
|
78
|
+
export declare class AggregationByClassName extends BaseAnalysisInfo {
|
|
79
|
+
name: string;
|
|
80
|
+
desc: string;
|
|
81
|
+
protected getColumns(): Map<string, string>;
|
|
82
|
+
protected getData(): Record<string, any>;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 按最短引用链聚合分析数据节点信息
|
|
86
|
+
*/
|
|
87
|
+
export declare class AggregationByShortestPath extends BaseAnalysisInfo {
|
|
88
|
+
name: string;
|
|
89
|
+
desc: string;
|
|
90
|
+
protected getColumns(): Map<string, string>;
|
|
91
|
+
protected getData(): Record<string, any>;
|
|
92
|
+
}
|
|
93
|
+
export declare class AggregationByProperty extends BaseAnalysisInfo {
|
|
94
|
+
name: string;
|
|
95
|
+
desc: string;
|
|
96
|
+
protected getColumns(): Map<string, string>;
|
|
97
|
+
protected getData(): Record<string, any>;
|
|
98
|
+
}
|
|
99
|
+
export declare class StatisticsByClassName extends BaseAnalysisInfo {
|
|
100
|
+
name: string;
|
|
101
|
+
desc: string;
|
|
102
|
+
protected getColumns(): Map<string, string>;
|
|
103
|
+
protected getData(): Record<string, any>;
|
|
104
|
+
}
|
|
105
|
+
export declare class StatisticsByDistance extends BaseAnalysisInfo {
|
|
106
|
+
name: string;
|
|
107
|
+
desc: string;
|
|
108
|
+
protected getColumns(): Map<string, string>;
|
|
109
|
+
protected getData(): Record<string, any>;
|
|
110
|
+
}
|
|
111
|
+
export {};
|
|
112
|
+
//# sourceMappingURL=AnalysisInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnalysisInfo.d.ts","sourceRoot":"","sources":["../../src/analyzer/AnalysisInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,WAAW,SAAS;IACtB,YAAY,EAAE,MAAM,UAAU,CAAC;CAClC;AAED,qBAAa,SAAS;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B,EAAE,MAAM,CAAC;IACrC,wBAAwB,EAAE,MAAM,CAAC;IACjC,gCAAgC,EAAE,MAAM,CAAC;IACzC,wBAAwB,EAAE,MAAM,CAAC;IAExC,QAAQ,IAAI,MAAM;CAQnB;AAED,qBAAa,YAAY;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,E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C1C,IAAI,EAAE,MAAM,CAAW;IAE9B,SAAS,CAAC,UAAU,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAW3C,SAAS,CAAC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAa3C;AAED,qBAAa,oBAAqB,SAAQ,gBAAgB;IAC/C,IAAI,EAAE,MAAM,CAA6B;IACzC,IAAI,EAAE,MAAM,CAAW;IAE9B,SAAS,CAAC,UAAU,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAW3C,SAAS,CAAC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAa3C"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatisticsByDistance = exports.StatisticsByClassName = exports.AggregationByProperty = exports.AggregationByShortestPath = exports.AggregationByClassName = exports.PropertyInfo = exports.ShortestPathInfo = exports.DistanceInfo = exports.ClassInfo = void 0;
|
|
4
|
+
class ClassInfo {
|
|
5
|
+
toString() {
|
|
6
|
+
return `Class Name: ${this.className},
|
|
7
|
+
Count: ${this.count},
|
|
8
|
+
Retained Size: ${(this.retainedSize / 1024).toFixed(2)} KB,
|
|
9
|
+
RetainedSizeTotalHeapPercent: ${this.retainedSizeTotalHeapPercent.toFixed(2)}%,
|
|
10
|
+
Shallow Size: ${(this.selfSize / 1024).toFixed(2)} KB,
|
|
11
|
+
ShallowSizeTotalHeapPercent: ${this.selfSizeTotalHeapPercent.toFixed(2)}%`;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ClassInfo = ClassInfo;
|
|
15
|
+
;
|
|
16
|
+
class DistanceInfo {
|
|
17
|
+
toString() {
|
|
18
|
+
return `Distance: ${this.distance},
|
|
19
|
+
Count: ${this.count},
|
|
20
|
+
Retained Size: ${(this.retainedSize / 1024).toFixed(2)} KB,
|
|
21
|
+
RetainedSizeTotalHeapPercent: ${this.retainedSizeTotalHeapPercent.toFixed(2)}%,
|
|
22
|
+
Shallow Size: ${(this.selfSize / 1024).toFixed(2)} KB,
|
|
23
|
+
ShallowSizeTotalHeapPercent: ${this.selfSizeTotalHeapPercent.toFixed(2)}%`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.DistanceInfo = DistanceInfo;
|
|
27
|
+
class ShortestPathInfo {
|
|
28
|
+
toString() {
|
|
29
|
+
return `ShortestPath: ${this.shortestPathStr},
|
|
30
|
+
Count: ${this.count},
|
|
31
|
+
Retained Size: ${(this.retainedSize / 1024).toFixed(2)} KB,
|
|
32
|
+
RetainedSizeTotalHeapPercent: ${this.retainedSizeTotalHeapPercent.toFixed(2)}%,
|
|
33
|
+
Shallow Size: ${(this.selfSize / 1024).toFixed(2)} KB,
|
|
34
|
+
ShallowSizeTotalHeapPercent: ${this.selfSizeTotalHeapPercent.toFixed(2)}%`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.ShortestPathInfo = ShortestPathInfo;
|
|
38
|
+
class PropertyInfo {
|
|
39
|
+
toString() {
|
|
40
|
+
return `Property Name: ${this.propName || ''},
|
|
41
|
+
Property ShortestPath: ${this.propShortestPath || ''},
|
|
42
|
+
Count: ${this.count},
|
|
43
|
+
Retained Size: ${(this.retainedSize / 1024).toFixed(2)} KB,
|
|
44
|
+
RetainedSizeTotalHeapPercent: ${this.retainedSizeTotalHeapPercent.toFixed(2)}%,
|
|
45
|
+
Shallow Size: ${(this.selfSize / 1024).toFixed(2)} KB,
|
|
46
|
+
ShallowSizeTotalHeapPercent: ${this.selfSizeTotalHeapPercent.toFixed(2)}%`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.PropertyInfo = PropertyInfo;
|
|
50
|
+
/**
|
|
51
|
+
* 分析数据节点
|
|
52
|
+
*/
|
|
53
|
+
class BaseAnalysisInfo {
|
|
54
|
+
getFeature() {
|
|
55
|
+
return `${this.type} ${this.desc}`;
|
|
56
|
+
}
|
|
57
|
+
getMessage() {
|
|
58
|
+
return [
|
|
59
|
+
`Total Heap Size: ${(this.totalHeapSize / 1024 / 1024).toFixed(2)} MB`,
|
|
60
|
+
`All ${this.type} Retained Size: ${(this.totalRetainedSize / 1024).toFixed(2)} KB`,
|
|
61
|
+
`All ${this.type} Shallow Size: ${(this.totalSelfSize / 1024).toFixed(2)} KB`,
|
|
62
|
+
`Count of ${this.type}: ${this.totalCount}`
|
|
63
|
+
];
|
|
64
|
+
}
|
|
65
|
+
getColumns() {
|
|
66
|
+
return new Map();
|
|
67
|
+
}
|
|
68
|
+
getData() {
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
toReportData() {
|
|
72
|
+
return {
|
|
73
|
+
feature: this.getFeature(),
|
|
74
|
+
messages: this.getMessage(),
|
|
75
|
+
columns: this.getColumns(),
|
|
76
|
+
data: this.getData()
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 按类名聚合分析数据节点信息
|
|
82
|
+
*/
|
|
83
|
+
class AggregationByClassName extends BaseAnalysisInfo {
|
|
84
|
+
constructor() {
|
|
85
|
+
super(...arguments);
|
|
86
|
+
this.name = AggregationByClassName.name;
|
|
87
|
+
this.desc = "按类名聚合";
|
|
88
|
+
}
|
|
89
|
+
getColumns() {
|
|
90
|
+
return new Map([
|
|
91
|
+
['className', 'Class Name'],
|
|
92
|
+
['count', 'Count'],
|
|
93
|
+
['retainedSize', 'Retained Size(KB)'],
|
|
94
|
+
['selfSize', 'Shallow Size(KB)'],
|
|
95
|
+
['retainedSizeTotalHeapPercent', 'Retained Size Ratio(%)'],
|
|
96
|
+
['selfSizeTotalHeapPercent', 'Shallow Size Ratio(%)']
|
|
97
|
+
]);
|
|
98
|
+
}
|
|
99
|
+
getData() {
|
|
100
|
+
var _a;
|
|
101
|
+
let data = [];
|
|
102
|
+
(_a = this.classInfos) === null || _a === void 0 ? void 0 : _a.forEach(info => {
|
|
103
|
+
data.push(Object.assign(Object.assign({}, info), { retainedSize: `${(info.retainedSize / 1024).toFixed(2)}KB`, selfSize: `${(info.selfSize / 1024).toFixed(2)}KB`, retainedSizeTotalHeapPercent: `${(info.retainedSizeTotalHeapPercent).toFixed(2)}%`, selfSizeTotalHeapPercent: `${(info.selfSizeTotalHeapPercent).toFixed(2)}%` }));
|
|
104
|
+
});
|
|
105
|
+
return data;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.AggregationByClassName = AggregationByClassName;
|
|
109
|
+
/**
|
|
110
|
+
* 按最短引用链聚合分析数据节点信息
|
|
111
|
+
*/
|
|
112
|
+
class AggregationByShortestPath extends BaseAnalysisInfo {
|
|
113
|
+
constructor() {
|
|
114
|
+
super(...arguments);
|
|
115
|
+
this.name = AggregationByShortestPath.name;
|
|
116
|
+
this.desc = "按最短引用链聚合";
|
|
117
|
+
}
|
|
118
|
+
getColumns() {
|
|
119
|
+
return new Map([
|
|
120
|
+
['shortestPathStr', 'Shortest Path To GCRoot'],
|
|
121
|
+
['count', 'Count'],
|
|
122
|
+
['retainedSize', 'Retained Size (KB)'],
|
|
123
|
+
['selfSize', 'Shallow Size (KB)'],
|
|
124
|
+
['retainedSizeTotalHeapPercent', 'Retained Size Ratio(%)'],
|
|
125
|
+
['selfSizeTotalHeapPercent', 'Shallow Size Ratio(%)']
|
|
126
|
+
]);
|
|
127
|
+
}
|
|
128
|
+
getData() {
|
|
129
|
+
var _a;
|
|
130
|
+
let data = [];
|
|
131
|
+
(_a = this.shortestPathInfos) === null || _a === void 0 ? void 0 : _a.forEach(info => {
|
|
132
|
+
data.push(Object.assign(Object.assign({}, info), { retainedSize: `${(info.retainedSize / 1024).toFixed(2)}KB`, selfSize: `${(info.selfSize / 1024).toFixed(2)}KB`, retainedSizeTotalHeapPercent: `${(info.retainedSizeTotalHeapPercent).toFixed(2)}%`, selfSizeTotalHeapPercent: `${(info.selfSizeTotalHeapPercent).toFixed(2)}%` }));
|
|
133
|
+
});
|
|
134
|
+
return data;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.AggregationByShortestPath = AggregationByShortestPath;
|
|
138
|
+
class AggregationByProperty extends BaseAnalysisInfo {
|
|
139
|
+
constructor() {
|
|
140
|
+
super(...arguments);
|
|
141
|
+
this.name = AggregationByProperty.name;
|
|
142
|
+
this.desc = "按属性最短引用路径聚合";
|
|
143
|
+
}
|
|
144
|
+
getColumns() {
|
|
145
|
+
return new Map([
|
|
146
|
+
['propName', 'Property Name'],
|
|
147
|
+
['propShortestPath', 'Property Shortest Path To GCRoot'],
|
|
148
|
+
['count', 'Count'],
|
|
149
|
+
['retainedSize', 'Retained Size(KB)'],
|
|
150
|
+
['selfSize', 'Shallow Size(KB)'],
|
|
151
|
+
['retainedSizeTotalHeapPercent', 'Retained Size Ratio(%)'],
|
|
152
|
+
['selfSizeTotalHeapPercent', 'Shallow Size Ratio(%)'],
|
|
153
|
+
]);
|
|
154
|
+
}
|
|
155
|
+
getData() {
|
|
156
|
+
var _a;
|
|
157
|
+
let data = [];
|
|
158
|
+
(_a = this.propertyInfos) === null || _a === void 0 ? void 0 : _a.forEach(info => {
|
|
159
|
+
// 处理百分比数据与size数据
|
|
160
|
+
data.push(Object.assign(Object.assign({}, info), { retainedSize: `${(info.retainedSize / 1024).toFixed(2)}KB`, selfSize: `${(info.selfSize / 1024).toFixed(2)}KB`, retainedSizeTotalHeapPercent: `${(info.retainedSizeTotalHeapPercent).toFixed(2)}%`, selfSizeTotalHeapPercent: `${(info.selfSizeTotalHeapPercent).toFixed(2)}%` }));
|
|
161
|
+
});
|
|
162
|
+
return data;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.AggregationByProperty = AggregationByProperty;
|
|
166
|
+
class StatisticsByClassName extends BaseAnalysisInfo {
|
|
167
|
+
constructor() {
|
|
168
|
+
super(...arguments);
|
|
169
|
+
this.name = StatisticsByClassName.name;
|
|
170
|
+
this.desc = "按类名统计";
|
|
171
|
+
}
|
|
172
|
+
getColumns() {
|
|
173
|
+
return new Map([
|
|
174
|
+
['className', 'Class Name'],
|
|
175
|
+
['count', 'Count'],
|
|
176
|
+
['retainedSize', 'Retained Size(KB)'],
|
|
177
|
+
['selfSize', 'Shallow Size(KB)'],
|
|
178
|
+
['retainedSizeTotalHeapPercent', 'Retained Size Ratio(%)'],
|
|
179
|
+
['selfSizeTotalHeapPercent', 'Shallow Size Ratio(%)'],
|
|
180
|
+
]);
|
|
181
|
+
}
|
|
182
|
+
getData() {
|
|
183
|
+
var _a;
|
|
184
|
+
let data = [];
|
|
185
|
+
(_a = this.distanceInfos) === null || _a === void 0 ? void 0 : _a.forEach(info => {
|
|
186
|
+
data.push(Object.assign(Object.assign({}, info), { retainedSize: `${(info.retainedSize / 1024).toFixed(2)}KB`, selfSize: `${(info.selfSize / 1024).toFixed(2)}KB`, retainedSizeTotalHeapPercent: `${(info.retainedSizeTotalHeapPercent).toFixed(2)}%`, selfSizeTotalHeapPercent: `${(info.selfSizeTotalHeapPercent).toFixed(2)}%` }));
|
|
187
|
+
});
|
|
188
|
+
return data;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
exports.StatisticsByClassName = StatisticsByClassName;
|
|
192
|
+
class StatisticsByDistance extends BaseAnalysisInfo {
|
|
193
|
+
constructor() {
|
|
194
|
+
super(...arguments);
|
|
195
|
+
this.name = StatisticsByDistance.name;
|
|
196
|
+
this.desc = "按距离统计";
|
|
197
|
+
}
|
|
198
|
+
getColumns() {
|
|
199
|
+
return new Map([
|
|
200
|
+
['distance', 'Distance'],
|
|
201
|
+
['count', 'Count'],
|
|
202
|
+
['retainedSize', 'Retained Size(KB)'],
|
|
203
|
+
['selfSize', 'Shallow Size(KB)'],
|
|
204
|
+
['retainedSizeTotalHeapPercent', 'Retained Size Ratio(%)'],
|
|
205
|
+
['selfSizeTotalHeapPercent', 'Shallow Size Ratio(%)'],
|
|
206
|
+
]);
|
|
207
|
+
}
|
|
208
|
+
getData() {
|
|
209
|
+
var _a;
|
|
210
|
+
let data = [];
|
|
211
|
+
(_a = this.distanceInfos) === null || _a === void 0 ? void 0 : _a.forEach(info => {
|
|
212
|
+
data.push(Object.assign(Object.assign({}, info), { retainedSize: `${(info.retainedSize / 1024).toFixed(2)}KB`, selfSize: `${(info.selfSize / 1024).toFixed(2)}KB`, retainedSizeTotalHeapPercent: `${(info.retainedSizeTotalHeapPercent).toFixed(2)}%`, selfSizeTotalHeapPercent: `${(info.selfSizeTotalHeapPercent).toFixed(2)}%` }));
|
|
213
|
+
});
|
|
214
|
+
return data;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
exports.StatisticsByDistance = StatisticsByDistance;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IAnalyzer } from "./IAnalyzer";
|
|
2
|
+
/**
|
|
3
|
+
* Ark 分析器
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class ArkAnalyzer implements IAnalyzer {
|
|
6
|
+
protected type: string;
|
|
7
|
+
protected configuration: any;
|
|
8
|
+
/**
|
|
9
|
+
* 解析
|
|
10
|
+
* @param args 解析参数
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
analyze(args: any[]): Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* 设置解析器配置
|
|
16
|
+
* @param cfg 解析器配置
|
|
17
|
+
*/
|
|
18
|
+
setConfig(cfg: any): void;
|
|
19
|
+
/**
|
|
20
|
+
* 获取解析器配置
|
|
21
|
+
* @returns 解析器配置
|
|
22
|
+
*/
|
|
23
|
+
getConfig(): any;
|
|
24
|
+
/**
|
|
25
|
+
* 获取解析器类型
|
|
26
|
+
* @returns 解析器类型
|
|
27
|
+
*/
|
|
28
|
+
getType(): string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=ArkAnalyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArkAnalyzer.d.ts","sourceRoot":"","sources":["../../src/analyzer/ArkAnalyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;GAEG;AACH,8BAAsB,WAAY,YAAW,SAAS;IAClD,SAAS,CAAC,IAAI,EAAE,MAAM,CAAkB;IACxC,SAAS,CAAC,aAAa,EAAE,GAAG,CAAC;IAE7B;;;;OAIG;IACU,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,GAAI,OAAO,CAAC,GAAG,CAAC;IAIhD;;;OAGG;IACI,SAAS,CAAC,GAAG,EAAE,GAAG,GAAI,IAAI;IAIjC;;;OAGG;IACI,SAAS,IAAI,GAAG;IAIvB;;;OAGG;IACI,OAAO,IAAI,MAAM;CAG3B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ArkAnalyzer = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* Ark 分析器
|
|
15
|
+
*/
|
|
16
|
+
class ArkAnalyzer {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.type = 'ark-analyzer';
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 解析
|
|
22
|
+
* @param args 解析参数
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
analyze(args) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return undefined;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 设置解析器配置
|
|
32
|
+
* @param cfg 解析器配置
|
|
33
|
+
*/
|
|
34
|
+
setConfig(cfg) {
|
|
35
|
+
this.configuration = cfg;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 获取解析器配置
|
|
39
|
+
* @returns 解析器配置
|
|
40
|
+
*/
|
|
41
|
+
getConfig() {
|
|
42
|
+
return this.configuration;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 获取解析器类型
|
|
46
|
+
* @returns 解析器类型
|
|
47
|
+
*/
|
|
48
|
+
getType() {
|
|
49
|
+
return this.type;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.ArkAnalyzer = ArkAnalyzer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ark Compare Configuration
|
|
3
|
+
*/
|
|
4
|
+
export type ArkCmpCfg = {
|
|
5
|
+
Node: {
|
|
6
|
+
enableNameWhiteList: boolean;
|
|
7
|
+
nameWhiteList: string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Ark Compare default configuration
|
|
12
|
+
* @returns default configuration
|
|
13
|
+
*/
|
|
14
|
+
export declare function defaultArkCmpCfg(): ArkCmpCfg;
|
|
15
|
+
//# sourceMappingURL=ArkCmpCfg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArkCmpCfg.d.ts","sourceRoot":"","sources":["../../src/analyzer/ArkCmpCfg.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,IAAI,EAAE;QACF,mBAAmB,EAAE,OAAO,CAAC;QAC7B,aAAa,EAAE,MAAM,EAAE,CAAA;KAC1B,CAAA;CACJ,CAAA;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAK,SAAS,CAO7C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultArkCmpCfg = defaultArkCmpCfg;
|
|
4
|
+
/**
|
|
5
|
+
* Ark Compare default configuration
|
|
6
|
+
* @returns default configuration
|
|
7
|
+
*/
|
|
8
|
+
function defaultArkCmpCfg() {
|
|
9
|
+
return {
|
|
10
|
+
Node: {
|
|
11
|
+
enableNameWhiteList: false,
|
|
12
|
+
nameWhiteList: []
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { IHeapSnapshot } from "@memlab/core";
|
|
2
|
+
import { ILoggable } from "../utils/Log";
|
|
3
|
+
import { ArkAnalyzer } from "./ArkAnalyzer";
|
|
4
|
+
/**
|
|
5
|
+
* Ark Heapsnapshot 比较分析器
|
|
6
|
+
*/
|
|
7
|
+
export declare class ArkCompareAnalyzer extends ArkAnalyzer implements ILoggable {
|
|
8
|
+
readonly DOMAIN: string;
|
|
9
|
+
readonly TAG: string;
|
|
10
|
+
static readonly NAME = "ark-compare-analyzer";
|
|
11
|
+
static readonly DESC = "Compare two heapsnapshot files and find the differences.";
|
|
12
|
+
srcSnapshot: IHeapSnapshot | undefined;
|
|
13
|
+
dstSnapshot: IHeapSnapshot | undefined;
|
|
14
|
+
srcSnapshotFilePath: string | undefined;
|
|
15
|
+
dstSnapshotFilePath: string | undefined;
|
|
16
|
+
nodeName: string | undefined;
|
|
17
|
+
constructor();
|
|
18
|
+
analyze(args: any[]): Promise<any>;
|
|
19
|
+
private getStatsOfAllNodes;
|
|
20
|
+
private getStatsByNodeName;
|
|
21
|
+
getDetailStatsByNodeName(snapshot: IHeapSnapshot, nodeName: string): Array<{
|
|
22
|
+
id: number;
|
|
23
|
+
selfSize: number;
|
|
24
|
+
retainedSize: number;
|
|
25
|
+
}>;
|
|
26
|
+
private getDiffs;
|
|
27
|
+
diffSnapshots(node_name?: string): Array<{
|
|
28
|
+
typeName: string;
|
|
29
|
+
srcCount: number;
|
|
30
|
+
dstCount: number;
|
|
31
|
+
countDiff: number;
|
|
32
|
+
srcSelfSize: number;
|
|
33
|
+
dstSelfSize: number;
|
|
34
|
+
selfSizeDiff: number;
|
|
35
|
+
srcRetainedSize: number;
|
|
36
|
+
dstRetainedSize: number;
|
|
37
|
+
retainedSizeDiff: number;
|
|
38
|
+
}>;
|
|
39
|
+
sortDiffs(type: number, diffs: Array<{
|
|
40
|
+
typeName: string;
|
|
41
|
+
srcCount: number;
|
|
42
|
+
dstCount: number;
|
|
43
|
+
countDiff: number;
|
|
44
|
+
srcSelfSize: number;
|
|
45
|
+
dstSelfSize: number;
|
|
46
|
+
selfSizeDiff: number;
|
|
47
|
+
srcRetainedSize: number;
|
|
48
|
+
dstRetainedSize: number;
|
|
49
|
+
retainedSizeDiff: number;
|
|
50
|
+
}>): Promise<any>;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=ArkCompareAnalyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArkCompareAnalyzer.d.ts","sourceRoot":"","sources":["../../src/analyzer/ArkCompareAnalyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAS,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAY,YAAW,SAAS;IACpE,SAAgB,MAAM,EAAE,MAAM,CAAgB;IAC9C,SAAgB,GAAG,SAA2B;IAC9C,gBAAuB,IAAI,0BAA0B;IACrD,gBAAuB,IAAI,8DAA8D;IAClF,WAAW,EAAE,aAAa,GAAG,SAAS,CAAa;IACnD,WAAW,EAAE,aAAa,GAA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