mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
always send perf-tick telemetry from perf bot (#171046)
This commit is contained in:
parent
c82c88f53a
commit
82d49f1649
|
@ -478,6 +478,7 @@ export abstract class AbstractTimerService implements ITimerService {
|
|||
|
||||
private readonly _barrier = new Barrier();
|
||||
private readonly _marks = new PerfMarks();
|
||||
private readonly rndValueShouldSendTelemetry = Math.random() < .3;
|
||||
|
||||
private _startupMetrics?: IStartupMetrics;
|
||||
|
||||
|
@ -581,13 +582,15 @@ export abstract class AbstractTimerService implements ITimerService {
|
|||
this._telemetryService.publicLog('startupTimeVaried', metrics);
|
||||
}
|
||||
|
||||
private readonly _shouldReportPerfMarks = Math.random() < .3;
|
||||
protected _shouldReportPerfMarks(): boolean {
|
||||
return this.rndValueShouldSendTelemetry;
|
||||
}
|
||||
|
||||
private _reportPerformanceMarks(source: string, marks: perf.PerformanceMark[]) {
|
||||
|
||||
if (!this._shouldReportPerfMarks) {
|
||||
if (!this._shouldReportPerfMarks()) {
|
||||
// the `startup.timer.mark` event is send very often. In order to save resources
|
||||
// we let only a third of our instances send this event
|
||||
// we let some of our instances/sessions send this event
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,6 +83,11 @@ export class TimerService extends AbstractTimerService {
|
|||
// ignore, be on the safe side with these hardware method calls
|
||||
}
|
||||
}
|
||||
|
||||
protected override _shouldReportPerfMarks(): boolean {
|
||||
// always send when running with the prof-append-timers flag
|
||||
return super._shouldReportPerfMarks() || Boolean(this._environmentService.args['prof-append-timers']);
|
||||
}
|
||||
}
|
||||
|
||||
registerSingleton(ITimerService, TimerService, InstantiationType.Delayed);
|
||||
|
|
Loading…
Reference in a new issue