sussudio
Version:
An unofficial VS Code Internal API
36 lines (35 loc) • 1.69 kB
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { URI } from "../../../base/common/uri.mjs";
import { IV8Profile } from "../common/profiling.mjs";
import { BottomUpSample } from "../common/profilingModel.mjs";
export declare const enum ProfilingOutput {
Failure = 0,
Irrelevant = 1,
Interesting = 2
}
export interface IScriptUrlClassifier {
(scriptUrl: string): string;
}
export declare const IProfileAnalysisWorkerService: import("../../instantiation/common/instantiation.mjs").ServiceIdentifier<IProfileAnalysisWorkerService>;
export interface IProfileAnalysisWorkerService {
readonly _serviceBrand: undefined;
analyseBottomUp(profile: IV8Profile, callFrameClassifier: IScriptUrlClassifier, perfBaseline: number): Promise<ProfilingOutput>;
analyseByLocation(profile: IV8Profile, locations: [location: URI, id: string][]): Promise<[category: string, aggregated: number][]>;
}
export interface BottomUpAnalysis {
kind: ProfilingOutput;
samples: BottomUpSample[];
}
export interface CategoryAnalysis {
category: string;
percentage: number;
aggregated: number;
overallDuration: number;
}
export interface IProfileAnalysisWorker {
analyseBottomUp(profile: IV8Profile): BottomUpAnalysis;
analyseByUrlCategory(profile: IV8Profile, categories: [url: URI, category: string][]): [category: string, aggregated: number][];
}