From b167ef97cd3ebfb95c5a84bccc055c2158de0cea Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 8 Sep 2016 10:38:10 +0200 Subject: [PATCH] drop timedPublicLog fixes #11676 --- .../extensionManagement/node/extensionGalleryService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts index 3c56accf3b0db..f85f1312d4f56 100644 --- a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts @@ -355,12 +355,13 @@ export class ExtensionGalleryService implements IExtensionGalleryService { const url = `${ getAssetSource(rawVersion.files, AssetType.VSIX) }?install=true`; const zipPath = path.join(tmpdir(), extension.id); const data = getGalleryExtensionTelemetryData(extension); - const timer = this.telemetryService.timedPublicLog('galleryService:downloadVSIX', data); + const startTime = new Date().getTime(); + const log = duration => this.telemetryService.publicLog('galleryService:downloadVSIX', assign(data, { duration })); return this.getCommonHeaders() .then(headers => this._getAsset({ url, headers })) .then(context => download(zipPath, context)) - .then(() => timer.stop()) + .then(() => log(new Date().getTime() - startTime)) .then(() => zipPath); }); });