Skip to content

Commit

Permalink
Post-review commit: display — instead of 0 for total time
Browse files Browse the repository at this point in the history
  • Loading branch information
julienw committed Jul 12, 2019
1 parent b1428ca commit 237ae25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/profile-logic/call-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ export class CallTree {
);

displayData = {
totalTime: formattedTotalTime,
totalTimeWithUnit: formattedTotalTime + 'ms',
totalTime: totalTime === 0 ? '—' : formattedTotalTime,
totalTimeWithUnit: totalTime === 0 ? '—' : formattedTotalTime + 'ms',
selfTime: selfTime === 0 ? '—' : formattedSelfTime,
selfTimeWithUnit: selfTime === 0 ? '—' : formattedSelfTime + 'ms',
totalTimePercent: `${formatPercent(totalTimeRelative)}`,
Expand Down
4 changes: 2 additions & 2 deletions src/test/unit/profile-tree.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ describe('diffing trees', function() {
const callTree = callTreeFromProfile(profile, /* threadIndex */ 2);
const formattedTree = formatTree(callTree);
expect(formattedTree).toEqual([
'- A (total: 0, self: —)',
'- A (total: , self: —)',
' - B (total: 1, self: —)',
' - D (total: -1, self: -1)',
' - G (total: 1, self: 1)',
Expand All @@ -579,7 +579,7 @@ describe('diffing trees', function() {
const formattedTree = formatTree(callTree);
expect(formattedTree).toEqual([
// A -> B -> D and A -> B -> G should be filtered out by the range filtering.
'- A (total: 0, self: —)',
'- A (total: , self: —)',
' - B (total: 1, self: —)',
' - I (total: 1, self: 1)',
' - C (total: -1, self: —)',
Expand Down

0 comments on commit 237ae25

Please sign in to comment.