Skip to content

Commit bcd72a9

Browse files
committed
Do not use "millis" field for COMPUTE_RECURSIVE events
1 parent 55c808e commit bcd72a9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

extensions/ql-vscode/src/log-insights/performance-comparison.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,12 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
128128
const index = this.getPredicateIndex(predicateName);
129129
let totalTime = 0;
130130
let totalTuples = 0;
131-
if (evaluationStrategy !== "IN_LAYER") {
131+
if (evaluationStrategy === "COMPUTE_SIMPLE") {
132132
totalTime += event.millis;
133133
} else {
134-
// IN_LAYER events do no record of their total time.
135-
// Make a best-effort estimate by adding up the positive iteration times (they can be negative).
134+
// Make a best-effort estimate of the total time by adding up the positive iteration times (they can be negative).
135+
// Note that for COMPUTE_RECURSIVE the "millis" field contain the total time of the SCC, not just that predicate,
136+
// but we don't have a good way to show that in the UI, so we rely on the accumulated iteration times.
136137
for (const millis of event.predicateIterationMillis ?? []) {
137138
if (millis > 0) {
138139
totalTime += millis;

0 commit comments

Comments
 (0)