UNPKG

@sussudio/platform

Version:

Internal APIs for VS Code's service injection the base services.

47 lines (45 loc) 1.67 kB
/*--------------------------------------------------------------------------------------------- * 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 '@sussudio/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][]; }