mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
Add "Measure Extension Host Latency" action
This commit is contained in:
@@ -739,6 +739,10 @@ export interface ExtHostExtensionServiceShape {
|
||||
$resolveAuthority(remoteAuthority: string): Promise<ResolvedAuthority>;
|
||||
$startExtensionHost(enabledExtensionIds: ExtensionIdentifier[]): Promise<void>;
|
||||
$activateByEvent(activationEvent: string): Promise<void>;
|
||||
|
||||
$test_latency(n: number): Promise<number>;
|
||||
$test_up(b: Buffer): Promise<number>;
|
||||
$test_down(size: number): Promise<Buffer>;
|
||||
}
|
||||
|
||||
export interface FileSystemEvents {
|
||||
|
||||
@@ -646,6 +646,20 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
.then(_ => this._activateByEvent(activationEvent, false))
|
||||
);
|
||||
}
|
||||
|
||||
public async $test_latency(n: number): Promise<number> {
|
||||
return n;
|
||||
}
|
||||
|
||||
public async $test_up(b: Buffer): Promise<number> {
|
||||
return b.length;
|
||||
}
|
||||
|
||||
public async $test_down(size: number): Promise<Buffer> {
|
||||
let b = Buffer.alloc(size, Math.random() % 256);
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function loadCommonJSModule<T>(logService: ILogService, modulePath: string, activationTimesBuilder: ExtensionActivationTimesBuilder): Promise<T> {
|
||||
|
||||
Reference in New Issue
Block a user