mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
adopt to latest perf module (#171549)
This commit is contained in:
committed by
GitHub
parent
12e6ef9799
commit
664c4ebf6c
@@ -7,23 +7,25 @@
|
||||
|
||||
const path = require('path');
|
||||
const perf = require('@vscode/vscode-perf');
|
||||
const minimist = require('minimist');
|
||||
|
||||
const VSCODE_FOLDER = path.join(__dirname, '..');
|
||||
|
||||
async function main() {
|
||||
|
||||
const args = [...process.argv];
|
||||
/** @type {string | undefined} */
|
||||
let build = undefined;
|
||||
|
||||
if (args.indexOf('--help') === -1 && args.indexOf('-h') === -1) {
|
||||
// get build arg from args
|
||||
let buildArgIndex = args.indexOf('--build');
|
||||
buildArgIndex = buildArgIndex === -1 ? args.indexOf('-b') : buildArgIndex;
|
||||
if (buildArgIndex === -1) {
|
||||
args.push('--build');
|
||||
args.push(getLocalCLIPath());
|
||||
build = getLocalCLIPath();
|
||||
} else {
|
||||
const exePath = args[buildArgIndex + 1];
|
||||
args.splice(buildArgIndex + 1, 1, getExePath(exePath));
|
||||
build = getExePath(args[buildArgIndex + 1]);
|
||||
args.splice(buildArgIndex + 1, 1);
|
||||
}
|
||||
|
||||
args.push('--folder');
|
||||
@@ -32,7 +34,10 @@ async function main() {
|
||||
args.push(path.join(VSCODE_FOLDER, 'package.json'));
|
||||
}
|
||||
|
||||
await perf(args);
|
||||
await perf.run(build ? {
|
||||
...minimist(args),
|
||||
build
|
||||
} : undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user