提交 c6d715e4 编写于 作者: J Johannes Rieken

add telemetry about profiling invite acceptance

上级 3b6d8a31
......@@ -13,6 +13,7 @@ import { IMessageService } from 'vs/platform/message/common/message';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { ITimerService } from 'vs/workbench/services/timer/common/timerService';
import { IWindowsService } from 'vs/platform/windows/common/windows';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions } from 'vs/workbench/common/contributions';
import { Registry } from 'vs/platform/platform';
import { ReportPerformanceIssueAction } from 'vs/workbench/electron-browser/actions';
......@@ -68,11 +69,12 @@ class ProfilingHint implements IWorkbenchContribution {
private static readonly _myPercentiles = ProfilingHint._percentiles[`${Platform[platform]}_${release()}`];
constructor(
@IWindowsService private _windowsService: IWindowsService,
@ITimerService private _timerService: ITimerService,
@IMessageService private _messageService: IMessageService,
@IEnvironmentService private _envService: IEnvironmentService,
@IStorageService private _storageService: IStorageService
@IWindowsService private readonly _windowsService: IWindowsService,
@ITimerService private readonly _timerService: ITimerService,
@IMessageService private readonly _messageService: IMessageService,
@IEnvironmentService private readonly _envService: IEnvironmentService,
@IStorageService private readonly _storageService: IStorageService,
@ITelemetryService private readonly _telemetryService: ITelemetryService,
) {
setTimeout(() => this._checkTimersAndSuggestToProfile(), 5000);
......@@ -128,6 +130,10 @@ class ProfilingHint implements IWorkbenchContribution {
primaryButton: 'Restart and profile'
});
this._telemetryService.publicLog('profileStartupInvite', {
acceptedInvite: profile
});
if (profile) {
this._storageService.store(mementoKey, 'didProfile', StorageScope.GLOBAL);
this._windowsService.relaunch({ addArgs: ['--prof-startup'] });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册