Skip to content

Commit

Permalink
tweak telemetry #60332
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 12, 2018
1 parent 2e43216 commit 6040b14
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont
}
data = data.slice(0, anchor + 1);

let percentage = (profile.endTime - profile.startTime) / 100;
const duration = profile.endTime - profile.startTime;
const percentage = duration / 100;
let top: NamedSlice;
for (const slice of data) {
slice.percentage = Math.round(slice.total / percentage);
Expand All @@ -88,8 +89,17 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont
}
}

this._logService.warn(`UNRESPONSIVE extension host, '${top.id}' took ${top.percentage}% of ${(profile.endTime - profile.startTime) / 1e3}ms`, data);
this._logService.warn(`UNRESPONSIVE extension host, '${top.id}' took ${top.percentage}% of ${duration / 1e3}ms`, data);

this._telemetryService.publicLog('extensionsAutoProfile', data);
/* __GDPR__
"exthostunresponsive" : {
"duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true },
"data": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
}
*/
this._telemetryService.publicLog('exthostunresponsive', {
duration: duration / 1e3,
data
});
}
}

0 comments on commit 6040b14

Please sign in to comment.