Skip to content

Commit

Permalink
test: fix duration rollup test now that has moved
Browse files Browse the repository at this point in the history
  • Loading branch information
lukecotter committed Jan 10, 2024
1 parent 6e95904 commit d2949e3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions log-viewer/modules/__tests__/ApexLogParser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,19 +694,6 @@ describe('Recalculate durations tests', () => {
expect(node.timestamp).toEqual(1);
expect(node.duration).toEqual({ self: 2, total: 2 });
});

it('Children are subtracted from net duration', () => {
const node = new Method(['14:32:07.563 (0)', 'DUMMY'], [], 'Method', ''),
child1 = new Method(['14:32:07.563 (10)', 'DUMMY'], [], 'Method', ''),
child2 = new Method(['14:32:07.563 (70)', 'DUMMY'], [], 'Method', '');
node.exitStamp = 100;
child1.duration.total = 50;
child2.duration.total = 25;
node.addChild(child1);
node.addChild(child2);
node.recalculateDurations();
expect(node.duration).toEqual({ self: 25, total: 100 });
});
});

describe('Line Type Tests', () => {
Expand Down
2 changes: 1 addition & 1 deletion log-viewer/modules/parsers/ApexLogParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default class ApexLogParser {

this.insertPackageWrappers(rootMethod);
this.setNamespaces(rootMethod);
this.aggregateTotals([rootMethod]);
this.aggregateTotals(rootMethod.children);
return rootMethod;
}

Expand Down

0 comments on commit d2949e3

Please sign in to comment.