@memlab/cli 1.0.1 → 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 +1 -1
- package/dist/BaseCommand.d.ts +1 -0
- package/dist/BaseCommand.js +21 -12
- package/dist/CommandLoader.d.ts +22 -0
- package/dist/CommandLoader.js +95 -0
- package/dist/Dispatcher.d.ts +1 -5
- package/dist/Dispatcher.js +8 -70
- package/dist/commands/MemLabRunCommand.d.ts +3 -1
- package/dist/commands/MemLabRunCommand.js +54 -2
- package/dist/commands/PrintSummaryCommand.js +1 -1
- package/dist/commands/RunMeasureCommand.d.ts +1 -0
- package/dist/commands/RunMeasureCommand.js +7 -0
- package/dist/commands/WarmupAppCommand.d.ts +1 -0
- package/dist/commands/WarmupAppCommand.js +6 -0
- package/dist/commands/heap/CheckLeakCommand.js +3 -1
- package/dist/commands/heap/GetRetainerTraceCommand.js +6 -2
- package/dist/commands/helper/GenerateCLIDocCommand.d.ts +31 -0
- package/dist/commands/helper/GenerateCLIDocCommand.js +207 -0
- package/dist/commands/helper/HelperCommand.js +2 -1
- package/dist/commands/snapshot/TakeSnapshotCommand.d.ts +1 -0
- package/dist/commands/snapshot/TakeSnapshotCommand.js +7 -0
- package/dist/options/HeapNodeIdOption.js +8 -9
- package/dist/options/heap/LeakClusterSizeThresholdOption.d.ts +19 -0
- package/dist/options/heap/LeakClusterSizeThresholdOption.js +43 -0
- package/dist/options/heap/OversizeThresholdOption.js +2 -2
- package/dist/options/heap/leak-filter/examples/large-object-as-leak.example.js +1 -0
- package/dist/options/lib/UniversalOptions.d.ts +17 -0
- package/dist/options/lib/UniversalOptions.js +27 -0
- package/package.json +2 -1
- package/dist/BaseCommand.d.ts.map +0 -1
- package/dist/Dispatcher.d.ts.map +0 -1
- package/dist/TypesThirdParty.d.ts.map +0 -1
- package/dist/commands/CleanLoggerDataCommand.d.ts.map +0 -1
- package/dist/commands/CleanRunDataCommand.d.ts.map +0 -1
- package/dist/commands/InitDirectoryCommand.d.ts.map +0 -1
- package/dist/commands/ListScenariosCommand.d.ts.map +0 -1
- package/dist/commands/MemLabRunCommand.d.ts.map +0 -1
- package/dist/commands/PrintSummaryCommand.d.ts.map +0 -1
- package/dist/commands/ResetDirectoryCommand.d.ts.map +0 -1
- package/dist/commands/RunMeasureCommand.d.ts.map +0 -1
- package/dist/commands/WarmupAppCommand.d.ts.map +0 -1
- package/dist/commands/heap/CheckLeakCommand.d.ts.map +0 -1
- package/dist/commands/heap/GetRetainerTraceCommand.d.ts.map +0 -1
- package/dist/commands/heap/HeapAnalysisCommand.d.ts.map +0 -1
- package/dist/commands/heap/HeapAnalysisSubCommandWrapper.d.ts.map +0 -1
- package/dist/commands/helper/HelperCommand.d.ts.map +0 -1
- package/dist/commands/helper/lib/CommandOrder.d.ts.map +0 -1
- package/dist/commands/helper/lib/Types.d.ts.map +0 -1
- package/dist/commands/query/QueryDefaultWorkDirCommand.d.ts.map +0 -1
- package/dist/commands/snapshot/CheckXvfbSupportCommand.d.ts.map +0 -1
- package/dist/commands/snapshot/Snapshot.d.ts.map +0 -1
- package/dist/commands/snapshot/TakeSnapshotCommand.d.ts.map +0 -1
- package/dist/commands/snapshot/WarmupAndSnapshotCommand.d.ts.map +0 -1
- package/dist/commands/test/BrowserTest.d.ts +0 -11
- package/dist/commands/test/BrowserTest.d.ts.map +0 -1
- package/dist/commands/test/BrowserTest.js +0 -41
- package/dist/commands/test/RunAllInteractionTestsCommand.d.ts +0 -19
- package/dist/commands/test/RunAllInteractionTestsCommand.d.ts.map +0 -1
- package/dist/commands/test/RunAllInteractionTestsCommand.js +0 -71
- package/dist/commands/test/RunInteractionTestCommand.d.ts +0 -19
- package/dist/commands/test/RunInteractionTestCommand.d.ts.map +0 -1
- package/dist/commands/test/RunInteractionTestCommand.js +0 -75
- package/dist/index.d.ts.map +0 -1
- package/dist/options/AppOption.d.ts.map +0 -1
- package/dist/options/DebugOption.d.ts.map +0 -1
- package/dist/options/DisableXvfbOption.d.ts.map +0 -1
- package/dist/options/FullExecutionOption.d.ts.map +0 -1
- package/dist/options/HeapNodeIdOption.d.ts.map +0 -1
- package/dist/options/HelperOption.d.ts.map +0 -1
- package/dist/options/InteractionOption.d.ts.map +0 -1
- package/dist/options/NumberOfRunsOption.d.ts.map +0 -1
- package/dist/options/RemoteBrowserDebugOption.d.ts.map +0 -1
- package/dist/options/RunningModeOption.d.ts.map +0 -1
- package/dist/options/ScenarioFileOption.d.ts.map +0 -1
- package/dist/options/SetContinuousTestOption.d.ts.map +0 -1
- package/dist/options/SetDeviceOption.d.ts.map +0 -1
- package/dist/options/SetWorkingDirectoryOption.d.ts.map +0 -1
- package/dist/options/SilentOption.d.ts.map +0 -1
- package/dist/options/SkipExtraOperationOption.d.ts.map +0 -1
- package/dist/options/SkipGCOption.d.ts.map +0 -1
- package/dist/options/SkipScreenshotOption.d.ts.map +0 -1
- package/dist/options/SkipScrollOption.d.ts.map +0 -1
- package/dist/options/SkipSnapshotOption.d.ts.map +0 -1
- package/dist/options/SkipWarmupOption.d.ts.map +0 -1
- package/dist/options/VerboseOption.d.ts.map +0 -1
- package/dist/options/heap/BaselineFileOption.d.ts.map +0 -1
- package/dist/options/heap/FinalFileOption.d.ts.map +0 -1
- package/dist/options/heap/JSEngineOption.d.ts.map +0 -1
- package/dist/options/heap/LogTraceAsClusterOption.d.ts.map +0 -1
- package/dist/options/heap/OversizeThresholdOption.d.ts.map +0 -1
- package/dist/options/heap/SnapshotDirectoryOption.d.ts.map +0 -1
- package/dist/options/heap/SnapshotFileOption.d.ts.map +0 -1
- package/dist/options/heap/TargetFileOption.d.ts.map +0 -1
- package/dist/options/heap/TraceAllObjectsOption.d.ts.map +0 -1
- package/dist/options/heap/leak-filter/LeakFilterFileOption.d.ts.map +0 -1
- package/dist/options/heap/leak-filter/examples/FilterLib.d.ts.map +0 -1
- package/dist/options/heap/leak-filter/examples/dup-string-as-leak.example-1.d.ts.map +0 -1
- package/dist/options/heap/leak-filter/examples/dup-string-as-leak.example-2.d.ts.map +0 -1
- package/dist/options/heap/leak-filter/examples/large-object-as-leak.example.d.ts.map +0 -1
- package/dist/runner.d.ts.map +0 -1
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*
|
|
8
|
+
* @emails oncall+ws_labs
|
|
9
|
+
* @format
|
|
10
|
+
*/
|
|
11
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(o, k2, desc);
|
|
18
|
+
}) : (function(o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
}));
|
|
22
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
+
}) : function(o, v) {
|
|
25
|
+
o["default"] = v;
|
|
26
|
+
});
|
|
27
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
35
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
36
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
37
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
38
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
39
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
40
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
const path_1 = __importDefault(require("path"));
|
|
48
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
49
|
+
const BaseCommand_1 = __importStar(require("../../BaseCommand"));
|
|
50
|
+
const core_1 = require("@memlab/core");
|
|
51
|
+
const UniversalOptions_1 = __importDefault(require("../../options/lib/UniversalOptions"));
|
|
52
|
+
class GenerateCLIDocCommand extends BaseCommand_1.default {
|
|
53
|
+
constructor() {
|
|
54
|
+
super(...arguments);
|
|
55
|
+
this.modules = new Map();
|
|
56
|
+
this.generatedCommandInIndex = new Set();
|
|
57
|
+
this.universalOptions = UniversalOptions_1.default;
|
|
58
|
+
}
|
|
59
|
+
getCommandName() {
|
|
60
|
+
return 'gen-cli-doc';
|
|
61
|
+
}
|
|
62
|
+
getDescription() {
|
|
63
|
+
return 'generate CLI markdown documentations';
|
|
64
|
+
}
|
|
65
|
+
isInternalCommand() {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
setModulesMap(modules) {
|
|
69
|
+
this.modules = modules;
|
|
70
|
+
}
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
72
|
+
run(options) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const docsDir = core_1.fileManager.getDocDir();
|
|
75
|
+
const cliDocsDir = path_1.default.join(docsDir, 'cli');
|
|
76
|
+
this.generateDocs(cliDocsDir);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
generateDocs(cliDocsDir) {
|
|
80
|
+
// first clean up the dir
|
|
81
|
+
fs_extra_1.default.removeSync(cliDocsDir);
|
|
82
|
+
fs_extra_1.default.mkdirSync(cliDocsDir);
|
|
83
|
+
// create index markdown file
|
|
84
|
+
const indexFile = path_1.default.join(cliDocsDir, 'CLI-commands.md');
|
|
85
|
+
this.writeCommandCategories(indexFile);
|
|
86
|
+
}
|
|
87
|
+
writeCommandCategories(docFile) {
|
|
88
|
+
this.writeTextWithNewLine(docFile, '# Command Line Interface');
|
|
89
|
+
for (const category in BaseCommand_1.CommandCategory) {
|
|
90
|
+
const commandsToPrintFirst = [];
|
|
91
|
+
this.writeCategory(docFile, category, commandsToPrintFirst);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
writeCategory(docFile, category, commandsToPrintFirst) {
|
|
95
|
+
// commands defined in commandsToPrintFirst
|
|
96
|
+
const commands = [];
|
|
97
|
+
for (const command of commandsToPrintFirst) {
|
|
98
|
+
const name = command.getCommandName();
|
|
99
|
+
if (this.generatedCommandInIndex.has(name)) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
commands.push(command);
|
|
103
|
+
}
|
|
104
|
+
// other commands in this category
|
|
105
|
+
for (const moduleEntries of this.modules) {
|
|
106
|
+
const command = moduleEntries[1];
|
|
107
|
+
if (category !== command.getCategory()) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (command.isInternalCommand() && !core_1.config.verbose) {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
const name = command.getCommandName();
|
|
114
|
+
if (this.generatedCommandInIndex.has(name)) {
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
commands.push(command);
|
|
118
|
+
}
|
|
119
|
+
if (commands.length === 0) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
this.writeCategoryHeader(docFile, category);
|
|
123
|
+
for (const command of commands) {
|
|
124
|
+
this.writeCommand(docFile, command);
|
|
125
|
+
this.generatedCommandInIndex.add(command.getCommandName());
|
|
126
|
+
}
|
|
127
|
+
this.writeTextWithNewLine(docFile, '');
|
|
128
|
+
}
|
|
129
|
+
writeCategoryHeader(docFile, category) {
|
|
130
|
+
const categoryName = category.toUpperCase();
|
|
131
|
+
this.writeTextWithNewLine(docFile, `\n## ${categoryName} Commands\n`);
|
|
132
|
+
}
|
|
133
|
+
writeCommand(docFile, command, indent = '') {
|
|
134
|
+
const name = command.getFullCommand();
|
|
135
|
+
const desc = core_1.utils.upperCaseFirstCharacter(command.getDescription());
|
|
136
|
+
// write command title
|
|
137
|
+
this.writeTextWithNewLine(docFile, `\n###${indent} memlab ${name}\n`);
|
|
138
|
+
// write description
|
|
139
|
+
this.writeTextWithNewLine(docFile, `${desc}\n`);
|
|
140
|
+
// get example
|
|
141
|
+
const examples = command.getExamples();
|
|
142
|
+
let example = '';
|
|
143
|
+
if (examples.length > 0) {
|
|
144
|
+
example = examples[0].trim();
|
|
145
|
+
}
|
|
146
|
+
// write command synopsis
|
|
147
|
+
const cmd = `memlab ${name} ${example}`;
|
|
148
|
+
this.writeCodeBlock(docFile, cmd, 'bash');
|
|
149
|
+
// write command examples if there is any
|
|
150
|
+
const exampleBlock = examples
|
|
151
|
+
.slice(1)
|
|
152
|
+
.map(example => `memlab ${name} ${example.trim()}`)
|
|
153
|
+
.join('\n');
|
|
154
|
+
if (exampleBlock.length > 0) {
|
|
155
|
+
this.writeTextWithNewLine(docFile, '\n#### examples\n');
|
|
156
|
+
this.writeCodeBlock(docFile, exampleBlock, 'bash');
|
|
157
|
+
}
|
|
158
|
+
// write options
|
|
159
|
+
this.writeCommandOptions(docFile, command);
|
|
160
|
+
const subCommands = command.getSubCommands();
|
|
161
|
+
for (const subCommand of subCommands) {
|
|
162
|
+
this.writeCommand(docFile, subCommand, indent + '#');
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
writeTextWithNewLine(docFile, content) {
|
|
166
|
+
this.touchFile(docFile);
|
|
167
|
+
fs_extra_1.default.appendFileSync(docFile, `${content}\n`, 'UTF-8');
|
|
168
|
+
}
|
|
169
|
+
touchFile(docFile) {
|
|
170
|
+
if (!fs_extra_1.default.existsSync(docFile)) {
|
|
171
|
+
fs_extra_1.default.writeFileSync(docFile, '', 'UTF-8');
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
writeCodeBlock(docFile, code, codeType = '') {
|
|
175
|
+
let normalizedCode = code;
|
|
176
|
+
while (normalizedCode.endsWith('\n')) {
|
|
177
|
+
normalizedCode = normalizedCode.slice(0, normalizedCode.length - 1);
|
|
178
|
+
}
|
|
179
|
+
this.touchFile(docFile);
|
|
180
|
+
fs_extra_1.default.appendFileSync(docFile, '```' + codeType + '\n' + normalizedCode + '\n```\n', 'UTF-8');
|
|
181
|
+
}
|
|
182
|
+
writeCommandOptions(docFile, command) {
|
|
183
|
+
const options = [
|
|
184
|
+
...command.getFullOptionsFromPrerequisiteChain(),
|
|
185
|
+
...this.universalOptions,
|
|
186
|
+
];
|
|
187
|
+
if (options.length === 0) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
this.writeTextWithNewLine(docFile, '\n**Options**:');
|
|
191
|
+
const optionsText = [];
|
|
192
|
+
for (const option of options) {
|
|
193
|
+
let header = `**\`--${option.getOptionName()}\`**`;
|
|
194
|
+
if (option.getOptionShortcut()) {
|
|
195
|
+
header += `, **\`-${option.getOptionShortcut()}\`**`;
|
|
196
|
+
}
|
|
197
|
+
const desc = option.getDescription();
|
|
198
|
+
optionsText.push({ header, desc });
|
|
199
|
+
}
|
|
200
|
+
for (const optionText of optionsText) {
|
|
201
|
+
const header = optionText.header;
|
|
202
|
+
const msg = ` * ${header}: ${optionText.desc}`;
|
|
203
|
+
this.writeTextWithNewLine(docFile, msg);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
exports.default = GenerateCLIDocCommand;
|
|
@@ -50,11 +50,12 @@ const string_width_1 = __importDefault(require("string-width"));
|
|
|
50
50
|
const core_1 = require("@memlab/core");
|
|
51
51
|
const CommandOrder_1 = __importDefault(require("./lib/CommandOrder"));
|
|
52
52
|
const BaseCommand_1 = __importStar(require("../../BaseCommand"));
|
|
53
|
+
const UniversalOptions_1 = __importDefault(require("../../options/lib/UniversalOptions"));
|
|
53
54
|
class HelperCommand extends BaseCommand_1.default {
|
|
54
55
|
constructor() {
|
|
55
56
|
super(...arguments);
|
|
56
57
|
this.printedCommand = new Set();
|
|
57
|
-
this.universalOptions =
|
|
58
|
+
this.universalOptions = UniversalOptions_1.default;
|
|
58
59
|
}
|
|
59
60
|
// The following terminal command will initiate with this command
|
|
60
61
|
// `memlab <command-name>`
|
|
@@ -14,6 +14,7 @@ export default class TakeSnapshotCommand extends BaseCommand {
|
|
|
14
14
|
getCommandName(): string;
|
|
15
15
|
getDescription(): string;
|
|
16
16
|
getPrerequisites(): BaseCommand[];
|
|
17
|
+
getExamples(): string[];
|
|
17
18
|
getOptions(): BaseOption[];
|
|
18
19
|
run(_options: CLIOptions): Promise<void>;
|
|
19
20
|
}
|
|
@@ -53,6 +53,13 @@ class TakeSnapshotCommand extends BaseCommand_1.default {
|
|
|
53
53
|
new CheckXvfbSupportCommand_1.default(),
|
|
54
54
|
];
|
|
55
55
|
}
|
|
56
|
+
getExamples() {
|
|
57
|
+
return [
|
|
58
|
+
'--scenario <TEST_SCENARIO_FILE>',
|
|
59
|
+
'--scenario /tmp/test-scenario.js',
|
|
60
|
+
'--scenario /tmp/test-scenario.js --work-dir /tmp/test-1/',
|
|
61
|
+
];
|
|
62
|
+
}
|
|
56
63
|
getOptions() {
|
|
57
64
|
return [
|
|
58
65
|
new AppOption_1.default(),
|
|
@@ -21,24 +21,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
const core_1 = require("@memlab/core");
|
|
22
22
|
class HeapNodeIdOption extends core_1.BaseOption {
|
|
23
23
|
getOptionName() {
|
|
24
|
-
return '
|
|
24
|
+
return 'node-id';
|
|
25
25
|
}
|
|
26
26
|
getDescription() {
|
|
27
27
|
return 'set heap node ID';
|
|
28
28
|
}
|
|
29
29
|
getExampleValues() {
|
|
30
|
-
return ['
|
|
30
|
+
return ['94435', '@94435'];
|
|
31
31
|
}
|
|
32
32
|
parse(config, args) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const optionName = this.getOptionName();
|
|
35
|
+
const optionValue = args[optionName];
|
|
36
|
+
if (optionValue) {
|
|
37
|
+
if (typeof optionValue === 'string' && optionValue.startsWith('@')) {
|
|
38
|
+
args[optionName] = optionValue.slice(1);
|
|
37
39
|
}
|
|
38
|
-
|
|
39
|
-
args.nodeId = args.nodeId.slice(1);
|
|
40
|
-
}
|
|
41
|
-
config.focusFiberNodeId = Number(args.nodeId);
|
|
40
|
+
config.focusFiberNodeId = Number(args[optionName]);
|
|
42
41
|
}
|
|
43
42
|
});
|
|
44
43
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @emails oncall+ws_labs
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
import type { ParsedArgs } from 'minimist';
|
|
11
|
+
import type { MemLabConfig } from '@memlab/core';
|
|
12
|
+
import { BaseOption } from '@memlab/core';
|
|
13
|
+
export default class LeakClusterSizeThresholdOption extends BaseOption {
|
|
14
|
+
getOptionName(): string;
|
|
15
|
+
getDescription(): string;
|
|
16
|
+
getExampleValues(): string[];
|
|
17
|
+
parse(config: MemLabConfig, args: ParsedArgs): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=LeakClusterSizeThresholdOption.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*
|
|
8
|
+
* @emails oncall+ws_labs
|
|
9
|
+
* @format
|
|
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
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
const core_1 = require("@memlab/core");
|
|
22
|
+
class LeakClusterSizeThresholdOption extends core_1.BaseOption {
|
|
23
|
+
getOptionName() {
|
|
24
|
+
return 'ignore-leak-cluster-size-below';
|
|
25
|
+
}
|
|
26
|
+
getDescription() {
|
|
27
|
+
return 'ignore memory leaks with aggregated retained size smaller than the threshold';
|
|
28
|
+
}
|
|
29
|
+
getExampleValues() {
|
|
30
|
+
return ['1000', '1000000'];
|
|
31
|
+
}
|
|
32
|
+
parse(config, args) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (args[this.getOptionName()]) {
|
|
35
|
+
const sizeThreshold = parseInt(args[this.getOptionName()], 10);
|
|
36
|
+
if (!isNaN(sizeThreshold)) {
|
|
37
|
+
config.clusterRetainedSizeThreshold = sizeThreshold;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.default = LeakClusterSizeThresholdOption;
|
|
@@ -21,10 +21,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
const core_1 = require("@memlab/core");
|
|
22
22
|
class OversizeThresholdOption extends core_1.BaseOption {
|
|
23
23
|
getOptionName() {
|
|
24
|
-
return '
|
|
24
|
+
return 'trace-object-size-above';
|
|
25
25
|
}
|
|
26
26
|
getDescription() {
|
|
27
|
-
return ('
|
|
27
|
+
return ('objects with retained size (bytes) ' +
|
|
28
28
|
'bigger than the threshold will be considered as leaks');
|
|
29
29
|
}
|
|
30
30
|
getExampleValues() {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @emails oncall+ws_labs
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
import DebugOption from '../DebugOption';
|
|
11
|
+
import HelperOption from '../HelperOption';
|
|
12
|
+
import SetContinuousTestOption from '../SetContinuousTestOption';
|
|
13
|
+
import SilentOption from '../SilentOption';
|
|
14
|
+
import VerboseOption from '../VerboseOption';
|
|
15
|
+
declare const universalOptions: (DebugOption | HelperOption | SetContinuousTestOption | SilentOption | VerboseOption)[];
|
|
16
|
+
export default universalOptions;
|
|
17
|
+
//# sourceMappingURL=UniversalOptions.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*
|
|
8
|
+
* @emails oncall+ws_labs
|
|
9
|
+
* @format
|
|
10
|
+
*/
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const DebugOption_1 = __importDefault(require("../DebugOption"));
|
|
16
|
+
const HelperOption_1 = __importDefault(require("../HelperOption"));
|
|
17
|
+
const SetContinuousTestOption_1 = __importDefault(require("../SetContinuousTestOption"));
|
|
18
|
+
const SilentOption_1 = __importDefault(require("../SilentOption"));
|
|
19
|
+
const VerboseOption_1 = __importDefault(require("../VerboseOption"));
|
|
20
|
+
const universalOptions = [
|
|
21
|
+
new HelperOption_1.default(),
|
|
22
|
+
new VerboseOption_1.default(),
|
|
23
|
+
new SetContinuousTestOption_1.default(),
|
|
24
|
+
new DebugOption_1.default(),
|
|
25
|
+
new SilentOption_1.default(),
|
|
26
|
+
];
|
|
27
|
+
exports.default = universalOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memlab/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "command line interface for memlab",
|
|
6
6
|
"author": "Liang Gong <lgong@fb.com>",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build-pkg": "tsc",
|
|
58
|
+
"publish-patch": "npm version patch --force && npm publish",
|
|
58
59
|
"clean-pkg": "rm -rf ./dist && rm -rf ./node_modules && rm -f ./tsconfig.tsbuildinfo"
|
|
59
60
|
},
|
|
60
61
|
"bugs": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCommand.d.ts","sourceRoot":"","sources":["../src/BaseCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AACvD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAExC,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,uBAAe,OAAO;IACpB,cAAc,IAAI,MAAM;IAUxB,OAAO,CAAC,aAAa,CAA+B;IAEpD,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAI3C,gBAAgB,IAAI,QAAQ,CAAC,WAAW,CAAC;IAIzC,cAAc,IAAI,MAAM;IAOxB,mCAAmC,IAAI,UAAU,EAAE;CAyBpD;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAG9C,cAAc,IAAI,MAAM;IAOxB,WAAW,IAAI,MAAM,EAAE;IAMvB,WAAW,IAAI,eAAe;IAM9B,cAAc,IAAI,MAAM;IAOxB,gBAAgB,IAAI,WAAW,EAAE;IAKjC,iBAAiB,IAAI,OAAO;IAK5B,UAAU,IAAI,UAAU,EAAE;IAQ1B,cAAc,IAAI,WAAW,EAAE;IAOzB,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAI/C"}
|
package/dist/Dispatcher.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dispatcher.d.ts","sourceRoot":"","sources":["../src/Dispatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACzC,OAAO,EAAC,YAAY,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAM5D,OAAO,WAAW,MAAM,eAAe,CAAC;AAQxC,aAAK,iBAAiB,GAAG;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,SAAS,CAAC;CAC9B,CAAC;AAYF,cAAM,iBAAiB;IACrB,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,WAAW,CAAsB;IACzC,OAAO,CAAC,gBAAgB,CAA0B;IAClD,OAAO,CAAC,qBAAqB,CAAqB;;IAU5C,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BzC,YAAY,CAChB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,UAAU,GACf,OAAO,CAAC,SAAS,CAAC;YAYP,UAAU;IA+ClB,kBAAkB,CACtB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,iBAAiB,GAC3B,OAAO,CAAC,IAAI,CAAC;YAuBF,MAAM;IAYpB,OAAO,CAAC,uBAAuB;IAI/B,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,uBAAuB;CA6ChC;;AAED,wBAAuC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypesThirdParty.d.ts","sourceRoot":"","sources":["../src/TypesThirdParty.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;AAEH,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,aAAa;QACrB,OAAO,EAAE,MAAM,CAAC;KACjB;IACD,MAAM,CAAC,OAAO,UAAU,OAAO,CAC7B,MAAM,EAAE,aAAa,GACpB,MAAM,CAAC,eAAe,CAAC;CAC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CleanLoggerDataCommand.d.ts","sourceRoot":"","sources":["../../src/commands/CleanLoggerDataCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAW,MAAM,cAAc,CAAC;AAEvD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAc,UAAU,EAAC,MAAM,cAAc,CAAC;AAIrD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,iBAAiB,IAAI,OAAO;IAI5B,UAAU,IAAI,UAAU,EAAE;IAIpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAK9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CleanRunDataCommand.d.ts","sourceRoot":"","sources":["../../src/commands/CleanRunDataCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAW,MAAM,cAAc,CAAC;AAEvD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAc,UAAU,EAAC,MAAM,cAAc,CAAC;AAGrD,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,iBAAiB,IAAI,OAAO;IAI5B,UAAU,IAAI,UAAU,EAAE;IAIpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAI9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InitDirectoryCommand.d.ts","sourceRoot":"","sources":["../../src/commands/InitDirectoryCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAW,MAAM,cAAc,CAAC;AAEvD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAsB,UAAU,EAAC,MAAM,cAAc,CAAC;AAG7D,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,WAAW;IAC3D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,iBAAiB,IAAI,OAAO;IAI5B,UAAU,IAAI,UAAU,EAAE;IAIpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAI9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListScenariosCommand.d.ts","sourceRoot":"","sources":["../../src/commands/ListScenariosCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAG7C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,WAAW;IAC3D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAKlB,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAgB/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MemLabRunCommand.d.ts","sourceRoot":"","sources":["../../src/commands/MemLabRunCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAE,UAAU,EAAW,MAAM,cAAc,CAAC;AAKnE,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAMzC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,WAAW,IAAI,MAAM,EAAE;IAIvB,gBAAgB,IAAI,WAAW,EAAE;IAQjC,UAAU,IAAI,UAAU,EAAE;IAIpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAU9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrintSummaryCommand.d.ts","sourceRoot":"","sources":["../../src/commands/PrintSummaryCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAW,MAAM,cAAc,CAAC;AAIvD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAoB,UAAU,EAAC,MAAM,cAAc,CAAC;AAG3D,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,iBAAiB,IAAI,OAAO;IAI5B,UAAU,IAAI,UAAU,EAAE;IAIpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAW9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResetDirectoryCommand.d.ts","sourceRoot":"","sources":["../../src/commands/ResetDirectoryCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAW,MAAM,cAAc,CAAC;AAEvD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAsB,UAAU,EAAC,MAAM,cAAc,CAAC;AAG7D,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,UAAU,IAAI,UAAU,EAAE;IAIpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAK9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RunMeasureCommand.d.ts","sourceRoot":"","sources":["../../src/commands/RunMeasureCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAgB,UAAU,EAAC,MAAM,cAAc,CAAC;AAkBvD,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,gBAAgB,IAAI,WAAW,EAAE;IAIjC,UAAU,IAAI,UAAU,EAAE;IAmBpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAS9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WarmupAppCommand.d.ts","sourceRoot":"","sources":["../../src/commands/WarmupAppCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAazC,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IACzD,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,gBAAgB,IAAI,WAAW,EAAE;IAIjC,UAAU,IAAI,UAAU,EAAE;IAcpB,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckLeakCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/heap/CheckLeakCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAC7C,OAAO,WAAW,EAAE,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAmB,MAAM,cAAc,CAAC;AAa1D,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,WAAW,IAAI,eAAe;IAI9B,gBAAgB,IAAI,WAAW,EAAE;IAIjC,UAAU,IAAI,UAAU,EAAE;IAepB,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAI/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GetRetainerTraceCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/heap/GetRetainerTraceCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAW,MAAM,cAAc,CAAC;AAGvD,OAAO,WAAW,EAAE,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAkB,MAAM,cAAc,CAAC;AAYzD,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,WAAW;IAC9D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,WAAW,IAAI,eAAe;IAI9B,WAAW,IAAI,MAAM,EAAE;IAIvB,UAAU,IAAI,UAAU,EAAE;IASpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAO9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeapAnalysisCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/heap/HeapAnalysisCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAG7C,OAAO,WAAW,EAAE,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAO/D,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,WAAW;IAC7D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,WAAW,IAAI,eAAe;IAI9B,gBAAgB,IAAI,WAAW,EAAE;IAIjC,cAAc,IAAI,WAAW,EAAE;IAU/B,WAAW,IAAI,MAAM,EAAE;IAIjB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAqB9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeapAnalysisSubCommandWrapper.d.ts","sourceRoot":"","sources":["../../../src/commands/heap/HeapAnalysisSubCommandWrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,WAAW,EAAE,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAEnD,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,WAAW;IACpE,OAAO,CAAC,YAAY,CAAe;gBAEvB,QAAQ,EAAE,YAAY;IAKlC,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,WAAW,IAAI,eAAe;IAI9B,UAAU,IAAI,UAAU,EAAE;IAIpB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAG9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HelperCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/helper/HelperCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAC,UAAU,EAAE,UAAU,EAAW,MAAM,cAAc,CAAC;AAMnE,OAAO,WAA8B,MAAM,mBAAmB,CAAC;AAE/D,aAAK,YAAY,GAAG,UAAU,GAAG;IAC/B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACpD,OAAO,CAAC,cAAc,CAA0B;IAChD,OAAO,CAAC,gBAAgB,CAAoB;IAI5C,cAAc,IAAI,MAAM;IAMxB,cAAc,IAAI,MAAM;IAIxB,WAAW,IAAI,MAAM,EAAE;IAIvB,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI;IAIhD,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,sBAAsB;IAY9B,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,aAAa;IAiCrB,OAAO,CAAC,wBAAwB;IAmBhC,OAAO,CAAC,YAAY;IA+BpB,OAAO,CAAC,YAAY;YAkCN,yBAAyB;YAiBzB,6BAA6B;IA0CrC,GAAG,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAehD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommandOrder.d.ts","sourceRoot":"","sources":["../../../../src/commands/helper/lib/CommandOrder.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;;AA8B1C,wBAAgF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Types.d.ts","sourceRoot":"","sources":["../../../../src/commands/helper/lib/Types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,WAAW,EAAE,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAElE,oBAAY,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB,CAAC;AAEF,oBAAY,YAAY,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryDefaultWorkDirCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/query/QueryDefaultWorkDirCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAC,UAAU,EAAO,MAAM,cAAc,CAAC;AAE9C,OAAO,WAAW,EAAE,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAc,UAAU,EAAC,MAAM,cAAc,CAAC;AAErD,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,WAAW;IACjE,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,WAAW,IAAI,eAAe;IAI9B,UAAU,IAAI,UAAU,EAAE;IAKpB,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckXvfbSupportCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/snapshot/CheckXvfbSupportCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAG7C,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAG5C,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,WAAW;IAC9D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,iBAAiB,IAAI,OAAO;IAKtB,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAa/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Snapshot.d.ts","sourceRoot":"","sources":["../../../src/commands/snapshot/Snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAoB/D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TakeSnapshotCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/snapshot/TakeSnapshotCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAiBxC,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,gBAAgB,IAAI,WAAW,EAAE;IAQjC,UAAU,IAAI,UAAU,EAAE;IAmBpB,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WarmupAndSnapshotCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/snapshot/WarmupAndSnapshotCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAC7C,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAK5C,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,WAAW;IAC/D,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,gBAAgB,IAAI,WAAW,EAAE;IAS3B,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/C"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
export declare function startInteractionTests(): void;
|
|
11
|
-
//# sourceMappingURL=BrowserTest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserTest.d.ts","sourceRoot":"","sources":["../../../src/commands/test/BrowserTest.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA+BH,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*
|
|
8
|
-
* @emails oncall+ws_labs
|
|
9
|
-
* @format
|
|
10
|
-
*/
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.startInteractionTests = void 0;
|
|
13
|
-
const core_1 = require("@memlab/core");
|
|
14
|
-
const e2e_1 = require("@memlab/e2e");
|
|
15
|
-
let curTarget = 0;
|
|
16
|
-
function getCommand(app, interaction) {
|
|
17
|
-
const cmd = `memlab`;
|
|
18
|
-
const args = [
|
|
19
|
-
'quick-interaction-test-single',
|
|
20
|
-
`--app=${app}`,
|
|
21
|
-
`--interaction=${interaction}`,
|
|
22
|
-
];
|
|
23
|
-
const options = { msg: [cmd, ...args].join(' ') };
|
|
24
|
-
return [cmd, args, options];
|
|
25
|
-
}
|
|
26
|
-
function nextCommand() {
|
|
27
|
-
const targets = e2e_1.defaultTestPlanner.getAllTargets();
|
|
28
|
-
// we've started all tasks in process
|
|
29
|
-
if (curTarget === targets.length) {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
const target = targets[curTarget++];
|
|
33
|
-
// @ts-expect-error unnecessary arg
|
|
34
|
-
return getCommand(target.app, target.interaction, target.warmup);
|
|
35
|
-
}
|
|
36
|
-
function startInteractionTests() {
|
|
37
|
-
core_1.config.runningMode = core_1.modes.get('interaction-test');
|
|
38
|
-
const procManager = new core_1.ProcessManager();
|
|
39
|
-
procManager.start(nextCommand);
|
|
40
|
-
}
|
|
41
|
-
exports.startInteractionTests = startInteractionTests;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @emails oncall+ws_labs
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
import type { CLIOptions } from '@memlab/core';
|
|
11
|
-
import BaseCommand, { CommandCategory } from '../../BaseCommand';
|
|
12
|
-
export default class RunAllInteractionTestsCommand extends BaseCommand {
|
|
13
|
-
getCommandName(): string;
|
|
14
|
-
getDescription(): string;
|
|
15
|
-
getCategory(): CommandCategory;
|
|
16
|
-
getPrerequisites(): BaseCommand[];
|
|
17
|
-
run(_options: CLIOptions): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=RunAllInteractionTestsCommand.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RunAllInteractionTestsCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/test/RunAllInteractionTestsCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AAE7C,OAAO,WAAW,EAAE,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAK/D,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,WAAW;IACpE,cAAc,IAAI,MAAM;IAIxB,cAAc,IAAI,MAAM;IAIxB,WAAW,IAAI,eAAe;IAI9B,gBAAgB,IAAI,WAAW,EAAE;IAK3B,GAAG,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/C"}
|