File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
extensions/ql-vscode/src/log-insights Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ interface SummaryEventBase {
30
30
interface ResultEventBase extends SummaryEventBase {
31
31
resultSize : number ;
32
32
dependencies ?: { [ key : string ] : string } ;
33
+ mainHash ?: string ;
33
34
}
34
35
35
36
export interface ComputeSimple extends ResultEventBase {
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
75
75
dependencyLists : [ ] ,
76
76
} ;
77
77
private readonly raToIndex = new Map < string , number > ( ) ;
78
+ private readonly mainHashToRepr = new Map < string , number > ( ) ;
78
79
private readonly nameToIndex = new Map < string , number > ( ) ;
79
80
80
81
private getPredicateIndex ( name : string , ra : string ) : number {
@@ -207,6 +208,19 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
207
208
dependencyList . push ( dependencyIndex ) ;
208
209
}
209
210
}
211
+ // For predicates in the same SCC, add two-way dependencies with an arbitrary SCC member
212
+ const sccHash =
213
+ event . mainHash ??
214
+ ( evaluationStrategy === "COMPUTE_RECURSIVE" ? raHash : null ) ;
215
+ if ( sccHash != null ) {
216
+ const mainIndex = this . mainHashToRepr . get ( sccHash ) ;
217
+ if ( mainIndex == null ) {
218
+ this . mainHashToRepr . set ( sccHash , index ) ;
219
+ } else {
220
+ dependencyLists [ index ] . push ( mainIndex ) ;
221
+ dependencyLists [ mainIndex ] . push ( index ) ;
222
+ }
223
+ }
210
224
timeCosts [ index ] += totalTime ;
211
225
tupleCosts [ index ] += totalTuples ;
212
226
iterationCounts [ index ] += event . pipelineRuns ?. length ?? 0 ;
You can’t perform that action at this time.
0 commit comments