Merge from vscode 4d91d96e5e121b38d33508cdef17868bab255eae

This commit is contained in:
ADS Merger
2020-06-18 04:32:54 +00:00
committed by AzureDataStudio
parent a971aee5bd
commit 5e7071e466
1002 changed files with 24201 additions and 13193 deletions

View File

@@ -19,7 +19,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
import { writeTransientState } from 'vs/workbench/contrib/codeEditor/browser/toggleWordWrap';
import { mergeSort } from 'vs/base/common/arrays';
import product from 'vs/platform/product/common/product';
import { IProductService } from 'vs/platform/product/common/productService';
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
@@ -58,9 +58,9 @@ export class PerfviewInput extends ResourceEditorInput {
@IFilesConfigurationService filesConfigurationService: IFilesConfigurationService
) {
super(
PerfviewInput.Uri,
localize('name', "Startup Performance"),
undefined,
PerfviewInput.Uri,
undefined,
textModelResolverService,
textFileService,
@@ -89,6 +89,7 @@ class PerfModelContentProvider implements ITextModelContentProvider {
@ILifecycleService private readonly _lifecycleService: ILifecycleService,
@ITimerService private readonly _timerService: ITimerService,
@IExtensionService private readonly _extensionService: IExtensionService,
@IProductService private readonly _productService: IProductService
) { }
provideTextContent(resource: URI): Promise<ITextModel> {
@@ -143,7 +144,7 @@ class PerfModelContentProvider implements ITextModelContentProvider {
private _addSummary(md: MarkdownBuilder, metrics: IStartupMetrics): void {
md.heading(2, 'System Info');
md.li(`${product.nameShort}: ${product.version} (${product.commit || '0000000'})`);
md.li(`${this._productService.nameShort}: ${this._productService.version} (${this._productService.commit || '0000000'})`);
md.li(`OS: ${metrics.platform}(${metrics.release})`);
if (metrics.cpus) {
md.li(`CPUs: ${metrics.cpus.model}(${metrics.cpus.count} x ${metrics.cpus.speed})`);
@@ -217,7 +218,7 @@ class PerfModelContentProvider implements ITextModelContentProvider {
md.value += `Name\tTimestamp\tDelta\tTotal\n`;
let lastStartTime = -1;
let total = 0;
for (const { name, timestamp: startTime } of perf.getEntries()) {
for (const { name, startTime } of perf.getEntries()) {
let delta = lastStartTime !== -1 ? startTime - lastStartTime : 0;
total += delta;
md.value += `${name}\t${startTime}\t${delta}\t${total}\n`;

View File

@@ -11,7 +11,6 @@ import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import product from 'vs/platform/product/common/product';
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
import { PerfviewInput } from 'vs/workbench/contrib/performance/electron-browser/perfviewEditor';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
@@ -109,7 +108,7 @@ export class StartupProfiler implements IWorkbenchContribution {
}
private async _createPerfIssue(files: string[]): Promise<void> {
const reportIssueUrl = product.reportIssueUrl;
const reportIssueUrl = this._productService.reportIssueUrl;
if (!reportIssueUrl) {
return;
}

View File

@@ -11,7 +11,7 @@ import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService';
import { ILifecycleService, StartupKind, StartupKindToString } from 'vs/platform/lifecycle/common/lifecycle';
import product from 'vs/platform/product/common/product';
import { IProductService } from 'vs/platform/product/common/productService';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IUpdateService } from 'vs/platform/update/common/update';
import { IElectronService } from 'vs/platform/electron/electron-sandbox/electron';
@@ -34,7 +34,8 @@ export class StartupTimings implements IWorkbenchContribution {
@ITelemetryService private readonly _telemetryService: ITelemetryService,
@ILifecycleService private readonly _lifecycleService: ILifecycleService,
@IUpdateService private readonly _updateService: IUpdateService,
@IWorkbenchEnvironmentService private readonly _envService: INativeWorkbenchEnvironmentService
@IWorkbenchEnvironmentService private readonly _envService: INativeWorkbenchEnvironmentService,
@IProductService private readonly _productService: IProductService
) {
//
this._report().catch(onUnexpectedError);
@@ -73,7 +74,7 @@ export class StartupTimings implements IWorkbenchContribution {
this._timerService.startupMetrics,
timeout(15000), // wait: cached data creation, telemetry sending
]).then(([startupMetrics]) => {
return promisify(appendFile)(appendTo, `${startupMetrics.ellapsed}\t${product.nameShort}\t${(product.commit || '').slice(0, 10) || '0000000000'}\t${sessionId}\t${standardStartupError === undefined ? 'standard_start' : 'NO_standard_start : ' + standardStartupError}\n`);
return promisify(appendFile)(appendTo, `${startupMetrics.ellapsed}\t${this._productService.nameShort}\t${(this._productService.commit || '').slice(0, 10) || '0000000000'}\t${sessionId}\t${standardStartupError === undefined ? 'standard_start' : 'NO_standard_start : ' + standardStartupError}\n`);
}).then(() => {
this._electronService.quit();
}).catch(err => {
@@ -123,7 +124,7 @@ export class StartupTimings implements IWorkbenchContribution {
private _reportPerfTicks(): void {
const entries: Record<string, number> = Object.create(null);
for (const entry of getEntries()) {
entries[entry.name] = entry.timestamp;
entries[entry.name] = entry.startTime;
}
/* __GDPR__
"startupRawTimers" : {
@@ -133,4 +134,3 @@ export class StartupTimings implements IWorkbenchContribution {
this._telemetryService.publicLog('startupRawTimers', { entries });
}
}