@@ -97,14 +97,12 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
97
97
}
98
98
99
99
onEvent ( event : SummaryEvent ) : void {
100
- if (
101
- event . completionType !== undefined &&
102
- event . completionType !== "SUCCESS"
103
- ) {
100
+ const { completionType, evaluationStrategy, predicateName } = event ;
101
+ if ( completionType !== undefined && completionType !== "SUCCESS" ) {
104
102
return ; // Skip any evaluation that wasn't successful
105
103
}
106
104
107
- switch ( event . evaluationStrategy ) {
105
+ switch ( evaluationStrategy ) {
108
106
case "EXTENSIONAL" :
109
107
case "COMPUTED_EXTENSIONAL" : {
110
108
break ;
@@ -113,26 +111,24 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
113
111
case "CACHACA" : {
114
112
// Record a cache hit, but only if the predicate has not been seen before.
115
113
// We're mainly interested in the reuse of caches from an earlier query run as they can distort comparisons.
116
- if ( ! this . nameToIndex . has ( event . predicateName ) ) {
117
- this . data . cacheHitIndices . push (
118
- this . getPredicateIndex ( event . predicateName ) ,
119
- ) ;
114
+ if ( ! this . nameToIndex . has ( predicateName ) ) {
115
+ this . data . cacheHitIndices . push ( this . getPredicateIndex ( predicateName ) ) ;
120
116
}
121
117
break ;
122
118
}
123
119
case "SENTINEL_EMPTY" : {
124
120
this . data . sentinelEmptyIndices . push (
125
- this . getPredicateIndex ( event . predicateName ) ,
121
+ this . getPredicateIndex ( predicateName ) ,
126
122
) ;
127
123
break ;
128
124
}
129
125
case "COMPUTE_RECURSIVE" :
130
126
case "COMPUTE_SIMPLE" :
131
127
case "IN_LAYER" : {
132
- const index = this . getPredicateIndex ( event . predicateName ) ;
128
+ const index = this . getPredicateIndex ( predicateName ) ;
133
129
let totalTime = 0 ;
134
130
let totalTuples = 0 ;
135
- if ( event . evaluationStrategy !== "IN_LAYER" ) {
131
+ if ( evaluationStrategy !== "IN_LAYER" ) {
136
132
totalTime += event . millis ;
137
133
} else {
138
134
// IN_LAYER events do no record of their total time.
0 commit comments