perf view - show running total in raw view
parent
f886dd4fb8
commit
c55cf4b241
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue