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 {
3030interface ResultEventBase extends SummaryEventBase {
3131 resultSize : number ;
3232 dependencies ?: { [ key : string ] : string } ;
33+ mainHash ?: string ;
3334}
3435
3536export interface ComputeSimple extends ResultEventBase {
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
7575 dependencyLists : [ ] ,
7676 } ;
7777 private readonly raToIndex = new Map < string , number > ( ) ;
78+ private readonly mainHashToRepr = new Map < string , number > ( ) ;
7879 private readonly nameToIndex = new Map < string , number > ( ) ;
7980
8081 private getPredicateIndex ( name : string , ra : string ) : number {
@@ -207,6 +208,19 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
207208 dependencyList . push ( dependencyIndex ) ;
208209 }
209210 }
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+ }
210224 timeCosts [ index ] += totalTime ;
211225 tupleCosts [ index ] += totalTuples ;
212226 iterationCounts [ index ] += event . pipelineRuns ?. length ?? 0 ;
You can’t perform that action at this time.
0 commit comments