From c55cf4b24106c9710ac8fc8af0d9c6948e4c3954 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 28 Dec 2018 18:31:01 +0100 Subject: [PATCH] perf view - show running total in raw view --- .../parts/performance/electron-browser/perfviewEditor.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/performance/electron-browser/perfviewEditor.ts b/src/vs/workbench/parts/performance/electron-browser/perfviewEditor.ts index 55b3f1ff095..f79cdf3f515 100644 --- a/src/vs/workbench/parts/performance/electron-browser/perfviewEditor.ts +++ b/src/vs/workbench/parts/performance/electron-browser/perfviewEditor.ts @@ -191,10 +191,13 @@ class PerfModelContentProvider implements ITextModelContentProvider { private _addRawPerfMarks(md: MarkdownBuilder): void { md.heading(2, 'Raw Perf Marks'); md.value += '```\n'; - md.value += `Name\tTimestamp\tDelta\n`; + md.value += `Name\tTimestamp\tDelta\tTotal\n`; let lastStartTime = -1; + let total = 0; for (const { name, startTime } of perf.getEntries('mark')) { - md.value += `${name}\t${startTime}\t${lastStartTime !== -1 ? startTime - lastStartTime : 0}\n`; + let delta = lastStartTime !== -1 ? startTime - lastStartTime : 0; + total += delta; + md.value += `${name}\t${startTime}\t${delta}\t${total}\n`; lastStartTime = startTime; } md.value += '```\n';