Skip to content

Commit

Permalink
Changes per review
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jan 31, 2023
1 parent 0bd0a61 commit 629dc05
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions bin/log-perormance-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,25 @@ const data = new TextEncoder().encode(
metrics: resultsFiles.reduce( ( result, { metricsPrefix }, index ) => {
return {
...result,
...Object.keys( performanceResults[ index ][ hash ] ).reduce(
( accumulator, key ) => {
accumulator[ metricsPrefix + key ] =
performanceResults[ index ][ hash ][ key ];
return accumulator;
},
{}
...Object.fromEntries(
Object.entries( performanceResults[ index ][ hash ] ).map(
( [ key, value ] ) => [ metricsPrefix + key, value ]
)
),
};
} ),
baseMetrics: resultsFiles.reduce(
( result, { metricsPrefix }, index ) => {
return {
...result,
...Object.keys(
performanceResults[ index ][ baseHash ]
).reduce( ( accumulator, key ) => {
accumulator[ metricsPrefix + key ] =
performanceResults[ index ][ hash ][ key ];
return accumulator;
}, {} ),
...Object.fromEntries(
Object.entries(
performanceResults[ index ][ baseHash ]
).map( ( [ key, value ] ) => [
metricsPrefix + key,
value,
] )
),
};
},
{}
Expand Down

0 comments on commit 629dc05

Please sign in to comment.