@memlab/heap-analysis 1.0.3 → 1.0.4

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/README.md CHANGED
@@ -3,5 +3,6 @@
3
3
  This is the memlab heap analysis library. It contains all memlab built-in heap analysis and
4
4
  provides a plugin interface for adding new heap analysis that can be easily added to memlab API and memlab CLI.
5
5
 
6
- ## Full documentation
7
- https://facebookincubator.github.io/memlab
6
+ ## Online Resources
7
+ * [Official Website and Demo](https://facebookincubator.github.io/memlab)
8
+ * [Documentation](https://facebookincubator.github.io/memlab/docs/intro)
package/dist/index.d.ts CHANGED
@@ -7,7 +7,9 @@
7
7
  * @emails oncall+ws_labs
8
8
  * @format
9
9
  */
10
- export declare const getDominatorNodes: (ids: Set<number>, snapshot: import("../../core/src").IHeapSnapshot) => Set<number>, getHeapFromFile: (file: string) => Promise<import("../../core/src").IHeapSnapshot>, getSnapshotDirForAnalysis: (options: import("./PluginUtils").HeapAnalysisOptions) => import("../../core/src").Nullable<string>, getSnapshotFileForAnalysis: (options: import("./PluginUtils").HeapAnalysisOptions) => string, loadHeapSnapshot: (options: import("./PluginUtils").HeapAnalysisOptions) => Promise<import("../../core/src").IHeapSnapshot>, snapshotMapReduce: <T1, T2>(mapCallback: (snapshot: import("../../core/src").IHeapSnapshot, i: number, file: string) => T1, reduceCallback: (results: T1[]) => T2, options: import("./PluginUtils").HeapAnalysisOptions) => Promise<T2>;
10
+ /** @internal */
11
+ export declare function registerPackage(): Promise<void>;
12
+ export declare const getDominatorNodes: (ids: Set<number>, snapshot: import("@memlab/core").IHeapSnapshot) => Set<number>, getHeapFromFile: (file: string) => Promise<import("@memlab/core").IHeapSnapshot>, getSnapshotDirForAnalysis: (options: import("./PluginUtils").HeapAnalysisOptions) => import("@memlab/core").Nullable<string>, getSnapshotFileForAnalysis: (options: import("./PluginUtils").HeapAnalysisOptions) => string, loadHeapSnapshot: (options: import("./PluginUtils").HeapAnalysisOptions) => Promise<import("@memlab/core").IHeapSnapshot>, snapshotMapReduce: <T1, T2>(mapCallback: (snapshot: import("@memlab/core").IHeapSnapshot, i: number, file: string) => T1, reduceCallback: (results: T1[]) => T2, options: import("./PluginUtils").HeapAnalysisOptions) => Promise<T2>;
11
13
  export type { HeapAnalysisOptions } from './PluginUtils';
12
14
  export { default as BaseAnalysis } from './BaseAnalysis';
13
15
  export { default as DetachedDOMElementAnalysis } from './plugins/DetachedDOMElementAnalysis';
package/dist/index.js CHANGED
@@ -8,11 +8,29 @@
8
8
  * @emails oncall+ws_labs
9
9
  * @format
10
10
  */
11
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
11
20
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
21
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
22
  };
14
23
  Object.defineProperty(exports, "__esModule", { value: true });
15
- 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.snapshotMapReduce = exports.loadHeapSnapshot = exports.getSnapshotFileForAnalysis = exports.getSnapshotDirForAnalysis = exports.getHeapFromFile = exports.getDominatorNodes = void 0;
24
+ 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.snapshotMapReduce = exports.loadHeapSnapshot = exports.getSnapshotFileForAnalysis = exports.getSnapshotDirForAnalysis = exports.getHeapFromFile = exports.getDominatorNodes = exports.registerPackage = void 0;
25
+ const path_1 = __importDefault(require("path"));
26
+ const core_1 = require("@memlab/core");
27
+ /** @internal */
28
+ function registerPackage() {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ return core_1.PackageInfoLoader.registerPackage(path_1.default.join(__dirname, '..'));
31
+ });
32
+ }
33
+ exports.registerPackage = registerPackage;
16
34
  const PluginUtils_1 = __importDefault(require("./PluginUtils"));
17
35
  exports.getDominatorNodes = PluginUtils_1.default.getDominatorNodes, exports.getHeapFromFile = PluginUtils_1.default.getHeapFromFile, exports.getSnapshotDirForAnalysis = PluginUtils_1.default.getSnapshotDirForAnalysis, exports.getSnapshotFileForAnalysis = PluginUtils_1.default.getSnapshotFileForAnalysis, exports.loadHeapSnapshot = PluginUtils_1.default.loadHeapSnapshot, exports.snapshotMapReduce = PluginUtils_1.default.snapshotMapReduce;
18
36
  var BaseAnalysis_1 = require("./BaseAnalysis");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memlab/heap-analysis",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "license": "MIT",
5
5
  "description": "heap analysis plugins for memlab",
6
6
  "author": "Liang Gong <lgong@fb.com>",
@@ -19,7 +19,7 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
- "@memlab/core": "^1.0.0",
22
+ "@memlab/core": "^1.1.5",
23
23
  "@memlab/e2e": "^1.0.0",
24
24
  "ansi": "^0.3.1",
25
25
  "babar": "^0.2.0",