mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
update v8 profiler package
This commit is contained in:
parent
3a08ae630c
commit
b35d879f76
|
@ -45,7 +45,7 @@
|
||||||
"semver": "^5.5.0",
|
"semver": "^5.5.0",
|
||||||
"spdlog": "0.7.2",
|
"spdlog": "0.7.2",
|
||||||
"sudo-prompt": "8.2.0",
|
"sudo-prompt": "8.2.0",
|
||||||
"v8-inspect-profiler": "^0.0.8",
|
"v8-inspect-profiler": "^0.0.13",
|
||||||
"vscode-chokidar": "1.6.5",
|
"vscode-chokidar": "1.6.5",
|
||||||
"vscode-debugprotocol": "1.32.0",
|
"vscode-debugprotocol": "1.32.0",
|
||||||
"vscode-nsfw": "1.1.1",
|
"vscode-nsfw": "1.1.1",
|
||||||
|
|
14
src/typings/v8-inspect-profiler.d.ts
vendored
14
src/typings/v8-inspect-profiler.d.ts
vendored
|
@ -31,7 +31,17 @@ declare module 'v8-inspect-profiler' {
|
||||||
stop(afterDelay?: number): PromiseLike<ProfileResult>;
|
stop(afterDelay?: number): PromiseLike<ProfileResult>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function startProfiling(options: { port: number, tries?: number, retyWait?: number }): PromiseLike<ProfilingSession>;
|
export interface Target {
|
||||||
|
description: string,
|
||||||
|
devtoolsFrontendUrl: string,
|
||||||
|
id: string,
|
||||||
|
title: string,
|
||||||
|
type: string,
|
||||||
|
url: string,
|
||||||
|
webSocketDebuggerUrl: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export function startProfiling(options: { port: number, tries?: number, retyWait?: number, target?: (targets: Target[]) => Target }): PromiseLike<ProfilingSession>;
|
||||||
export function writeProfile(profile: ProfileResult, name?: string): PromiseLike<void>;
|
export function writeProfile(profile: ProfileResult, name?: string): PromiseLike<void>;
|
||||||
export function rewriteAbsolutePaths(profile, replaceWith?);
|
export function rewriteAbsolutePaths(profile: ProfileResult, replaceWith?: string): ProfileResult;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ import { resolveTerminalEncoding } from 'vs/base/node/encoding';
|
||||||
import * as iconv from 'iconv-lite';
|
import * as iconv from 'iconv-lite';
|
||||||
import { writeFileAndFlushSync } from 'vs/base/node/extfs';
|
import { writeFileAndFlushSync } from 'vs/base/node/extfs';
|
||||||
import { isWindows } from 'vs/base/common/platform';
|
import { isWindows } from 'vs/base/common/platform';
|
||||||
import { ProfilingSession } from 'v8-inspect-profiler';
|
import { ProfilingSession, Target } from 'v8-inspect-profiler';
|
||||||
import { createWaitMarkerFile } from 'vs/code/node/wait';
|
import { createWaitMarkerFile } from 'vs/code/node/wait';
|
||||||
|
|
||||||
function shouldSpawnCliProcess(argv: ParsedArgs): boolean {
|
function shouldSpawnCliProcess(argv: ParsedArgs): boolean {
|
||||||
|
@ -262,7 +262,7 @@ export async function main(argv: string[]): Promise<any> {
|
||||||
processCallbacks.push(async _child => {
|
processCallbacks.push(async _child => {
|
||||||
|
|
||||||
class Profiler {
|
class Profiler {
|
||||||
static async start(name: string, filenamePrefix: string, opts: { port: number, tries?: number, chooseTab?: Function }) {
|
static async start(name: string, filenamePrefix: string, opts: { port: number, tries?: number, target?: (targets: Target[]) => Target }) {
|
||||||
const profiler = await import('v8-inspect-profiler');
|
const profiler = await import('v8-inspect-profiler');
|
||||||
|
|
||||||
let session: ProfilingSession;
|
let session: ProfilingSession;
|
||||||
|
@ -301,8 +301,8 @@ export async function main(argv: string[]): Promise<any> {
|
||||||
const rendererProfileRequest = Profiler.start('renderer', filenamePrefix, {
|
const rendererProfileRequest = Profiler.start('renderer', filenamePrefix, {
|
||||||
port: portRenderer,
|
port: portRenderer,
|
||||||
tries: 200,
|
tries: 200,
|
||||||
chooseTab: function (targets) {
|
target: function (targets) {
|
||||||
return targets.find(target => {
|
return targets.filter(target => {
|
||||||
if (!target.webSocketDebuggerUrl) {
|
if (!target.webSocketDebuggerUrl) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ export async function main(argv: string[]): Promise<any> {
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
})[0];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
28
yarn.lock
28
yarn.lock
|
@ -1260,13 +1260,13 @@ chownr@^1.0.1:
|
||||||
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181"
|
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181"
|
||||||
integrity sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=
|
integrity sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=
|
||||||
|
|
||||||
chrome-remote-interface@^0.25.3:
|
chrome-remote-interface@^0.26.1:
|
||||||
version "0.25.3"
|
version "0.26.1"
|
||||||
resolved "https://registry.yarnpkg.com/chrome-remote-interface/-/chrome-remote-interface-0.25.3.tgz#b692ae538cd5af3a6dd285636bfab3d29a7006c1"
|
resolved "https://registry.yarnpkg.com/chrome-remote-interface/-/chrome-remote-interface-0.26.1.tgz#6c7d4479742b6d236752d716a9bc2d322d7d8ad2"
|
||||||
integrity sha512-+GJLyocWojJbo9ODkRGKkMA/jMgzVZtCUOpYSeVXYlPTWkcjUqsV4PeTgLWbzRy8TIRj69xYm0Gcy2Oo07AkYA==
|
integrity sha512-ela482aJK0riFu05sl+zdbnb3ezMiqzwsqf/f/27HngWds+Fat3vcZWpIoDoeQuWMid/+LfKAteAYWaWPqsweg==
|
||||||
dependencies:
|
dependencies:
|
||||||
commander "2.11.x"
|
commander "2.11.x"
|
||||||
ws "3.3.x"
|
ws "^3.3.3"
|
||||||
|
|
||||||
chrome-trace-event@^1.0.0:
|
chrome-trace-event@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
|
@ -9059,12 +9059,12 @@ v8-compile-cache@^2.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz#a428b28bb26790734c4fc8bc9fa106fccebf6a6c"
|
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz#a428b28bb26790734c4fc8bc9fa106fccebf6a6c"
|
||||||
integrity sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==
|
integrity sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==
|
||||||
|
|
||||||
v8-inspect-profiler@^0.0.8:
|
v8-inspect-profiler@^0.0.13:
|
||||||
version "0.0.8"
|
version "0.0.13"
|
||||||
resolved "https://registry.yarnpkg.com/v8-inspect-profiler/-/v8-inspect-profiler-0.0.8.tgz#4d6bedb7c3d1bfc69e5bfdc2ded3d6784a5a76a6"
|
resolved "https://registry.yarnpkg.com/v8-inspect-profiler/-/v8-inspect-profiler-0.0.13.tgz#4bf4e7d51a9df8ac6f9a1df5487a636cf4ec2c5a"
|
||||||
integrity sha1-TWvtt8PRv8aeW/3C3tPWeEpadqY=
|
integrity sha512-t6EldtIyV35/AkwFH40Dikhv9ZzySdjFPdnhVlNR4EWA0cVvOXnr1djc35HhG57yFdbFGRb8A2cxAFuccc1uxw==
|
||||||
dependencies:
|
dependencies:
|
||||||
chrome-remote-interface "^0.25.3"
|
chrome-remote-interface "^0.26.1"
|
||||||
|
|
||||||
v8flags@^2.0.2:
|
v8flags@^2.0.2:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
|
@ -9584,10 +9584,10 @@ write@^0.2.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
mkdirp "^0.5.1"
|
mkdirp "^0.5.1"
|
||||||
|
|
||||||
ws@3.3.x:
|
ws@^3.3.3:
|
||||||
version "3.3.2"
|
version "3.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.2.tgz#96c1d08b3fefda1d5c1e33700d3bfaa9be2d5608"
|
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
|
||||||
integrity sha512-t+WGpsNxhMR4v6EClXS8r8km5ZljKJzyGhJf7goJz9k5Ye3+b5Bvno5rjqPuIBn5mnn5GBb7o8IrIWHxX1qOLQ==
|
integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==
|
||||||
dependencies:
|
dependencies:
|
||||||
async-limiter "~1.0.0"
|
async-limiter "~1.0.0"
|
||||||
safe-buffer "~5.1.0"
|
safe-buffer "~5.1.0"
|
||||||
|
|
Loading…
Reference in a new issue