Skip to content

Commit

Permalink
Performance: Fix empty results handling in performance test results (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla authored Feb 1, 2023
1 parent 0a61f89 commit a71746b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bin/log-perormance-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ const data = new TextEncoder().encode(
return {
...result,
...Object.fromEntries(
Object.entries( performanceResults[ index ][ hash ] ).map(
( [ key, value ] ) => [ metricsPrefix + key, value ]
)
Object.entries(
performanceResults[ index ][ hash ] ?? {}
).map( ( [ key, value ] ) => [
metricsPrefix + key,
value,
] )
),
};
} ),
Expand All @@ -51,7 +54,7 @@ const data = new TextEncoder().encode(
...result,
...Object.fromEntries(
Object.entries(
performanceResults[ index ][ baseHash ]
performanceResults[ index ][ baseHash ] ?? {}
).map( ( [ key, value ] ) => [
metricsPrefix + key,
value,
Expand Down

0 comments on commit a71746b

Please sign in to comment.