@@ -110,12 +110,12 @@ for (const [suite, benchmarks] of Object.entries(tests)) {
110110 console . groupEnd ( ) ;
111111}
112112
113- const aMetricInfo =
113+ const metricInfoFilterByName =
114114 ( testName : string ) =>
115115 ( { info : { test_name } } : MetricInfo ) =>
116116 test_name === testName ;
117117
118- const anMBsMetric = ( { name } : Metric ) => name === 'megabytes_per_second' ;
118+ const isMBsMetric = ( { name } : Metric ) => name === 'megabytes_per_second' ;
119119
120120function calculateCompositeBenchmarks ( results : MetricInfo [ ] ) {
121121 const composites = {
@@ -162,10 +162,10 @@ function calculateCompositeBenchmarks(results: MetricInfo[]) {
162162
163163 let sum = 0 ;
164164 for ( const testName of compositeTests ) {
165- const testScore = results . find ( aMetricInfo ( testName ) ) ;
165+ const testScore = results . find ( metricInfoFilterByName ( testName ) ) ;
166166 assert . ok ( testScore , `${ compositeName } suite requires ${ testName } for composite score` ) ;
167167
168- const metric = testScore . metrics . find ( anMBsMetric ) ;
168+ const metric = testScore . metrics . find ( isMBsMetric ) ;
169169 assert . ok ( metric , `${ testName } is missing a megabytes_per_second metric` ) ;
170170
171171 sum += metric . value ;
@@ -199,22 +199,22 @@ function calculateCompositeBenchmarks(results: MetricInfo[]) {
199199}
200200
201201function calculateNormalizedResults ( results : MetricInfo [ ] ) : MetricInfo [ ] {
202- const baselineBench = results . find ( aMetricInfo ( 'cpuBaseline' ) ) ;
203- const pingBench = results . find ( aMetricInfo ( 'ping' ) ) ;
202+ const baselineBench = results . find ( metricInfoFilterByName ( 'cpuBaseline' ) ) ;
203+ const pingBench = results . find ( metricInfoFilterByName ( 'ping' ) ) ;
204204
205205 assert . ok ( pingBench , 'ping bench results not found!' ) ;
206206 assert . ok ( baselineBench , 'cpuBaseline results not found!' ) ;
207207
208- const cpuBaseline = baselineBench . metrics . find ( anMBsMetric ) ;
209- const pingThroughput = pingBench . metrics . find ( anMBsMetric ) ;
208+ const cpuBaseline = baselineBench . metrics . find ( isMBsMetric ) ;
209+ const pingThroughput = pingBench . metrics . find ( isMBsMetric ) ;
210210
211211 assert . ok ( cpuBaseline , 'cpu benchmark does not have a MB/s metric' ) ;
212212 assert . ok ( pingThroughput , 'ping does not have a MB/s metric' ) ;
213213
214214 for ( const bench of results ) {
215215 if ( bench . info . test_name === 'cpuBaseline' ) continue ;
216216
217- const currentMetric = bench . metrics . find ( anMBsMetric ) ;
217+ const currentMetric = bench . metrics . find ( isMBsMetric ) ;
218218 assert . ok ( currentMetric , `${ bench . info . test_name } does not have a MB/s metric` ) ;
219219
220220 if ( bench . info . test_name === 'ping' ) {
0 commit comments