Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
dependencyLists: [],
};
private readonly raToIndex = new Map<string, number>();
private readonly nameToIndex = new Map<string, number>();

private getPredicateIndex(name: string, ra: string): number {
let index = this.raToIndex.get(ra);
Expand Down Expand Up @@ -114,8 +115,21 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
}

switch (evaluationStrategy) {
case "EXTENSIONAL":
case "EXTENSIONAL": {
break;
}
case "COMPUTED_EXTENSIONAL": {
if (predicateName.startsWith("cached_")) {
// Add a dependency from a cached COMPUTED_EXTENSIONAL to the predicate with the actual contents.
// The raHash of the this event may appear in a CACHE_HIT events in the other event log. The dependency
Comment thread
asgerf marked this conversation as resolved.
Outdated
// we're adding here is needed in order to associate the original predicate with such a cache hit.
const originalName = predicateName.substring("cached_".length);
const originalIndex = this.nameToIndex.get(originalName);
if (originalIndex != null) {
const index = this.getPredicateIndex(predicateName, raHash);
this.data.dependencyLists[index].push(originalIndex);
}
}
break;
}
case "CACHE_HIT":
Expand All @@ -140,6 +154,7 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
case "NAMED_LOCAL":
case "IN_LAYER": {
const index = this.getPredicateIndex(predicateName, raHash);
this.nameToIndex.set(predicateName, index);
let totalTime = 0;
let totalTuples = 0;
if (evaluationStrategy === "COMPUTE_SIMPLE") {
Expand Down