@memlab/api 1.0.6 → 1.0.11
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/API.d.ts +1 -1
- package/dist/API.js +1 -1
- package/dist/__tests__/API/E2EBasicAnalysis.test.d.ts +1 -1
- package/dist/__tests__/API/E2EBasicAnalysis.test.js +1 -1
- package/dist/__tests__/API/E2EDetachedDOMAnalysis.test.d.ts +1 -1
- package/dist/__tests__/API/E2EDetachedDOMAnalysis.test.js +1 -1
- package/dist/__tests__/API/E2EDuplicateObjectAnalysis.test.d.ts +1 -1
- package/dist/__tests__/API/E2EDuplicateObjectAnalysis.test.js +1 -1
- package/dist/__tests__/API/E2EFindLeaks.example.d.ts +1 -1
- package/dist/__tests__/API/E2EFindLeaks.example.js +1 -1
- package/dist/__tests__/API/E2EFindMemoryLeaks.test.d.ts +1 -1
- package/dist/__tests__/API/E2EFindMemoryLeaks.test.js +1 -1
- package/dist/__tests__/API/E2EResultReader.test.d.ts +1 -1
- package/dist/__tests__/API/E2EResultReader.test.js +1 -1
- package/dist/__tests__/API/E2ERunMultipleSnapshots.example.d.ts +1 -1
- package/dist/__tests__/API/E2ERunMultipleSnapshots.example.js +1 -1
- package/dist/__tests__/API/E2ERunSingleSnapshot.example.d.ts +1 -1
- package/dist/__tests__/API/E2ERunSingleSnapshot.example.js +1 -1
- package/dist/__tests__/API/E2EShapeUnboundGrowthAnalysis.test.d.ts +1 -1
- package/dist/__tests__/API/E2EShapeUnboundGrowthAnalysis.test.js +1 -1
- package/dist/__tests__/API/E2EStringAnalysis.test.d.ts +1 -1
- package/dist/__tests__/API/E2EStringAnalysis.test.js +1 -1
- package/dist/__tests__/API/lib/E2ETestSettings.d.ts +1 -1
- package/dist/__tests__/API/lib/E2ETestSettings.js +1 -1
- package/dist/__tests__/heap/E2EHeapParser.test.d.ts +1 -1
- package/dist/__tests__/heap/E2EHeapParser.test.js +1 -1
- package/dist/__tests__/heap/examples/example-1.d.ts +1 -1
- package/dist/__tests__/heap/examples/example-1.js +2 -2
- package/dist/__tests__/heap/examples/example-2.d.ts +1 -1
- package/dist/__tests__/heap/examples/example-2.js +2 -2
- package/dist/__tests__/heap/examples/example-3.d.ts +1 -1
- package/dist/__tests__/heap/examples/example-3.js +2 -2
- package/dist/__tests__/heap/examples/example-4.d.ts +1 -1
- package/dist/__tests__/heap/examples/example-4.js +2 -2
- package/dist/__tests__/heap/examples/example-5.test.d.ts +1 -1
- package/dist/__tests__/heap/examples/example-5.test.js +3 -3
- package/dist/__tests__/heap/examples/example-6.d.ts +1 -1
- package/dist/__tests__/heap/examples/example-6.js +2 -2
- package/dist/__tests__/heap/examples/example-7.test.d.ts +1 -1
- package/dist/__tests__/heap/examples/example-7.test.js +2 -2
- package/dist/__tests__/heap/lib/HeapParserTestUtils.d.ts +1 -1
- package/dist/__tests__/heap/lib/HeapParserTestUtils.js +1 -1
- package/dist/__tests__/packages/heap-analysis.test.d.ts +1 -1
- package/dist/__tests__/packages/heap-analysis.test.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/lib/APIUtils.d.ts +1 -1
- package/dist/lib/APIUtils.js +1 -1
- package/dist/result-reader/BaseResultReader.d.ts +1 -1
- package/dist/result-reader/BaseResultReader.js +1 -1
- package/dist/result-reader/BrowserInteractionResultReader.d.ts +1 -1
- package/dist/result-reader/BrowserInteractionResultReader.js +1 -1
- package/package.json +4 -4
package/dist/API.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
import type { ParsedArgs } from 'minimist';
|
|
11
11
|
import type { AnyFunction, ISerializedInfo, IScenario } from '@memlab/core';
|
package/dist/API.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=E2EBasicAnalysis.test.d.ts.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=E2EDetachedDOMAnalysis.test.d.ts.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=E2EDuplicateObjectAnalysis.test.d.ts.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=E2EFindMemoryLeaks.test.d.ts.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=E2ERunMultipleSnapshots.example.d.ts.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=E2ERunSingleSnapshot.example.d.ts.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=E2EShapeUnboundGrowthAnalysis.test.d.ts.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=E2EStringAnalysis.test.d.ts.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
import type { Page } from 'puppeteer';
|
|
11
11
|
export declare const testTimeout: number;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
import type { AnyValue } from '@memlab/core';
|
|
11
11
|
declare global {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -30,7 +30,7 @@ class TestObject {
|
|
|
30
30
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
31
|
const obj = new TestObject();
|
|
32
32
|
// get a heap snapshot of the current program state
|
|
33
|
-
const heap = yield (0, core_1.
|
|
33
|
+
const heap = yield (0, core_1.takeNodeMinimalHeap)();
|
|
34
34
|
const node = heap.getAnyObjectWithClassName('TestObject');
|
|
35
35
|
console.log(node === null || node === void 0 ? void 0 : node.name);
|
|
36
36
|
});
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -23,7 +23,7 @@ const heap_analysis_1 = require("@memlab/heap-analysis");
|
|
|
23
23
|
(function () {
|
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
25
|
const heapFile = (0, core_1.dumpNodeHeapSnapshot)();
|
|
26
|
-
const heap = yield (0, heap_analysis_1.
|
|
26
|
+
const heap = yield (0, heap_analysis_1.getFullHeapFromFile)(heapFile);
|
|
27
27
|
// get the total number of heap objects
|
|
28
28
|
heap.nodes.length;
|
|
29
29
|
heap.nodes.forEach((node) => {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -23,7 +23,7 @@ const heap_analysis_1 = require("@memlab/heap-analysis");
|
|
|
23
23
|
(function () {
|
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
25
|
const heapFile = (0, core_1.dumpNodeHeapSnapshot)();
|
|
26
|
-
const heap = yield (0, heap_analysis_1.
|
|
26
|
+
const heap = yield (0, heap_analysis_1.getFullHeapFromFile)(heapFile);
|
|
27
27
|
// get the total number of heap references
|
|
28
28
|
heap.edges.length;
|
|
29
29
|
heap.edges.forEach((edge) => {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -23,7 +23,7 @@ const heap_analysis_1 = require("@memlab/heap-analysis");
|
|
|
23
23
|
(function () {
|
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
25
|
const heapFile = (0, core_1.dumpNodeHeapSnapshot)();
|
|
26
|
-
const heap = yield (0, heap_analysis_1.
|
|
26
|
+
const heap = yield (0, heap_analysis_1.getFullHeapFromFile)(heapFile);
|
|
27
27
|
const node = heap.getNodeById(1);
|
|
28
28
|
if (node) {
|
|
29
29
|
console.log(node.id);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -29,13 +29,13 @@ test('memory test', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
29
29
|
core_1.config.muteConsole = true;
|
|
30
30
|
let obj = new TestObject();
|
|
31
31
|
// get a heap snapshot of the current program state
|
|
32
|
-
let heap = yield (0, core_1.
|
|
32
|
+
let heap = yield (0, core_1.takeNodeMinimalHeap)();
|
|
33
33
|
// call some function that may add references to obj
|
|
34
34
|
// rabbitHole()
|
|
35
35
|
expect(heap.hasObjectWithClassName('TestObject')).toBe(true);
|
|
36
36
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
37
|
obj = null;
|
|
38
|
-
heap = yield (0, core_1.
|
|
38
|
+
heap = yield (0, core_1.takeNodeMinimalHeap)();
|
|
39
39
|
// if rabbitHole does not add new references, the obj can be GCed
|
|
40
40
|
expect(heap.hasObjectWithClassName('TestObject')).toBe(false);
|
|
41
41
|
}), 30000);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -25,7 +25,7 @@ const heap_analysis_1 = require("@memlab/heap-analysis");
|
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
26
26
|
const object = { 'memlab-test-heap-property': 'memlab-test-heap-value' };
|
|
27
27
|
const heapFile = (0, core_1.dumpNodeHeapSnapshot)();
|
|
28
|
-
const heap = yield (0, heap_analysis_1.
|
|
28
|
+
const heap = yield (0, heap_analysis_1.getFullHeapFromFile)(heapFile);
|
|
29
29
|
// should be true
|
|
30
30
|
console.log(heap.hasObjectWithPropertyName('memlab-test-heap-property'));
|
|
31
31
|
});
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -28,7 +28,7 @@ test('memory test', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
28
28
|
// tag o2 with marker: "memlab-mark-2"
|
|
29
29
|
(0, core_1.tagObject)(o2, 'memlab-mark-2');
|
|
30
30
|
o2 = null;
|
|
31
|
-
const heap = yield (0, core_1.
|
|
31
|
+
const heap = yield (0, core_1.takeNodeMinimalHeap)();
|
|
32
32
|
// expect object with marker "memlab-mark-1" exists
|
|
33
33
|
expect(heap.hasObjectWithTag('memlab-mark-1')).toBe(true);
|
|
34
34
|
// expect object with marker "memlab-mark-2" can be GCed
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
import type { IHeapSnapshot } from '@memlab/core';
|
|
11
11
|
export declare function isExpectedSnapshot(leakInjector: () => void, checkSnapshotCb: (snapshot: IHeapSnapshot) => boolean): Promise<void>;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
package/dist/index.d.ts
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
/** @internal */
|
|
11
11
|
export declare function registerPackage(): Promise<void>;
|
|
12
12
|
export * from './API';
|
|
13
13
|
export * from '@memlab/heap-analysis';
|
|
14
14
|
export { default as BrowserInteractionResultReader } from './result-reader/BrowserInteractionResultReader';
|
|
15
|
-
export { dumpNodeHeapSnapshot, getNodeInnocentHeap } from '@memlab/core';
|
|
15
|
+
export { dumpNodeHeapSnapshot, getNodeInnocentHeap, takeNodeMinimalHeap, } from '@memlab/core';
|
|
16
16
|
/** @internal */
|
|
17
17
|
export { config } from '@memlab/core';
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
12
|
if (k2 === undefined) k2 = k;
|
|
@@ -35,7 +35,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
35
35
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.config = exports.getNodeInnocentHeap = exports.dumpNodeHeapSnapshot = exports.BrowserInteractionResultReader = exports.registerPackage = void 0;
|
|
38
|
+
exports.config = exports.takeNodeMinimalHeap = exports.getNodeInnocentHeap = exports.dumpNodeHeapSnapshot = exports.BrowserInteractionResultReader = exports.registerPackage = void 0;
|
|
39
39
|
const path_1 = __importDefault(require("path"));
|
|
40
40
|
const core_1 = require("@memlab/core");
|
|
41
41
|
/** @internal */
|
|
@@ -52,6 +52,7 @@ Object.defineProperty(exports, "BrowserInteractionResultReader", { enumerable: t
|
|
|
52
52
|
var core_2 = require("@memlab/core");
|
|
53
53
|
Object.defineProperty(exports, "dumpNodeHeapSnapshot", { enumerable: true, get: function () { return core_2.dumpNodeHeapSnapshot; } });
|
|
54
54
|
Object.defineProperty(exports, "getNodeInnocentHeap", { enumerable: true, get: function () { return core_2.getNodeInnocentHeap; } });
|
|
55
|
+
Object.defineProperty(exports, "takeNodeMinimalHeap", { enumerable: true, get: function () { return core_2.takeNodeMinimalHeap; } });
|
|
55
56
|
/** @internal */
|
|
56
57
|
var core_3 = require("@memlab/core");
|
|
57
58
|
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return core_3.config; } });
|
package/dist/lib/APIUtils.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
import type { Browser } from 'puppeteer';
|
|
11
11
|
import type { MemLabConfig } from '@memlab/core';
|
package/dist/lib/APIUtils.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
12
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
7
|
* @format
|
|
8
|
+
* @oncall ws_labs
|
|
9
9
|
*/
|
|
10
10
|
import type { E2EStepInfo, RunMetaInfo } from '@memlab/core';
|
|
11
11
|
import BaseResultReader from './BaseResultReader';
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
8
|
* @format
|
|
9
|
+
* @oncall ws_labs
|
|
10
10
|
*/
|
|
11
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memlab/api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "memlab API",
|
|
6
6
|
"author": "Liang Gong <lgong@fb.com>",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@memlab/core": "^1.1.
|
|
30
|
-
"@memlab/e2e": "^1.0.
|
|
31
|
-
"@memlab/heap-analysis": "^1.0.
|
|
29
|
+
"@memlab/core": "^1.1.10",
|
|
30
|
+
"@memlab/e2e": "^1.0.9",
|
|
31
|
+
"@memlab/heap-analysis": "^1.0.7",
|
|
32
32
|
"ansi": "^0.3.1",
|
|
33
33
|
"babar": "^0.2.0",
|
|
34
34
|
"chalk": "^4.0.0",
|