@memlab/heap-analysis 1.0.40 → 2.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.
@@ -59,8 +59,8 @@ class Analysis {
59
59
  * different return value format.
60
60
  * @internal
61
61
  */
62
- run(options = PluginUtils_1.default.defaultAnalysisArgs) {
63
- return __awaiter(this, void 0, void 0, function* () {
62
+ run() {
63
+ return __awaiter(this, arguments, void 0, function* (options = PluginUtils_1.default.defaultAnalysisArgs) {
64
64
  loadScenarioConfig();
65
65
  yield this.process(options);
66
66
  });
@@ -94,8 +94,8 @@ class Analysis {
94
94
  * });
95
95
  * ```
96
96
  */
97
- analyzeSnapshotFromFile(file, options = {}) {
98
- return __awaiter(this, void 0, void 0, function* () {
97
+ analyzeSnapshotFromFile(file_1) {
98
+ return __awaiter(this, arguments, void 0, function* (file, options = {}) {
99
99
  if (options.workDir) {
100
100
  // set and init the new work dir
101
101
  core_1.config.defaultFileManagerOption = options;
@@ -144,8 +144,8 @@ class Analysis {
144
144
  * });
145
145
  * ```
146
146
  */
147
- analyzeSnapshotsInDirectory(directory, options = {}) {
148
- return __awaiter(this, void 0, void 0, function* () {
147
+ analyzeSnapshotsInDirectory(directory_1) {
148
+ return __awaiter(this, arguments, void 0, function* (directory, options = {}) {
149
149
  if (options.workDir) {
150
150
  // set and init the new work dir
151
151
  core_1.config.defaultFileManagerOption = options;
@@ -486,8 +486,8 @@ function getHeapFromFile(file) {
486
486
  return yield loadProcessedSnapshot({ file });
487
487
  });
488
488
  }
489
- function loadProcessedSnapshot(options = {}) {
490
- return __awaiter(this, void 0, void 0, function* () {
489
+ function loadProcessedSnapshot() {
490
+ return __awaiter(this, arguments, void 0, function* (options = {}) {
491
491
  const opt = { buildNodeIdIndex: true, verbose: true };
492
492
  const file = options.file || core_2.utils.getSnapshotFilePathWithTabType(/.*/);
493
493
  const snapshot = yield core_2.utils.getSnapshotFromFile(file, opt);
package/dist/index.js CHANGED
@@ -21,7 +21,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
21
21
  return (mod && mod.__esModule) ? mod : { "default": mod };
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.heapConfig = exports.heapAnalysisLoader = exports.PluginUtils = exports.StringAnalysis = exports.ObjectUnboundGrowthAnalysis = exports.ObjectShapeAnalysis = exports.ObjectFanoutAnalysis = exports.ShapeUnboundGrowthAnalysis = exports.ObjectSizeAnalysis = exports.ObjectShallowAnalysis = exports.CollectionsHoldingStaleAnalysis = exports.GlobalVariableAnalysis = exports.DetachedDOMElementAnalysis = exports.BaseAnalysis = exports.takeNodeFullHeap = exports.snapshotMapReduce = exports.loadHeapSnapshot = exports.getSnapshotFileForAnalysis = exports.getSnapshotDirForAnalysis = exports.getFullHeapFromFile = exports.getHeapFromFile = exports.getDominatorNodes = exports.registerPackage = void 0;
24
+ exports.heapConfig = exports.heapAnalysisLoader = exports.PluginUtils = exports.StringAnalysis = exports.ObjectUnboundGrowthAnalysis = exports.ObjectShapeAnalysis = exports.ObjectFanoutAnalysis = exports.ShapeUnboundGrowthAnalysis = exports.ObjectSizeAnalysis = exports.ObjectShallowAnalysis = exports.CollectionsHoldingStaleAnalysis = exports.GlobalVariableAnalysis = exports.DetachedDOMElementAnalysis = exports.BaseAnalysis = exports.takeNodeFullHeap = exports.snapshotMapReduce = exports.loadHeapSnapshot = exports.getSnapshotFileForAnalysis = exports.getSnapshotDirForAnalysis = exports.getFullHeapFromFile = exports.getHeapFromFile = exports.getDominatorNodes = void 0;
25
+ exports.registerPackage = registerPackage;
25
26
  const path_1 = __importDefault(require("path"));
26
27
  const core_1 = require("@memlab/core");
27
28
  /** @internal */
@@ -30,7 +31,6 @@ function registerPackage() {
30
31
  return core_1.PackageInfoLoader.registerPackage(path_1.default.join(__dirname, '..'));
31
32
  });
32
33
  }
33
- exports.registerPackage = registerPackage;
34
34
  const PluginUtils_1 = __importDefault(require("./PluginUtils"));
35
35
  exports.getDominatorNodes = PluginUtils_1.default.getDominatorNodes,
36
36
  /** @deprecated */
@@ -162,7 +162,7 @@ class CollectionUnboundGrowthAnalysis extends BaseAnalysis_1.default {
162
162
  core_1.info.topLevel('\n' + str);
163
163
  // save results to file
164
164
  const csv = core_1.serializer.summarizeUnboundedObjectsToCSV(ids);
165
- fs_1.default.writeFileSync(core_1.config.unboundObjectCSV, csv, 'UTF-8');
165
+ fs_1.default.writeFileSync(core_1.config.unboundObjectCSV, csv, { encoding: 'utf8' });
166
166
  });
167
167
  }
168
168
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BuiltInGlobalVariables.d.ts","sourceRoot":"","sources":["../../../src/plugins/GlobalVariableAnalysis/BuiltInGlobalVariables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;;AAEH,wBAoiCG"}
1
+ {"version":3,"file":"BuiltInGlobalVariables.d.ts","sourceRoot":"","sources":["../../../src/plugins/GlobalVariableAnalysis/BuiltInGlobalVariables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;;AAEH,wBAmjCG"}