From a71746b6d1bdb4fe66e401c3041acfe01c969dd5 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Wed, 1 Feb 2023 15:23:54 +0200 Subject: [PATCH] Performance: Fix empty results handling in performance test results (#47646) --- bin/log-perormance-results.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/log-perormance-results.js b/bin/log-perormance-results.js index 568760d49bce4b..189d5cb0cbc4ea 100755 --- a/bin/log-perormance-results.js +++ b/bin/log-perormance-results.js @@ -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, + ] ) ), }; } ), @@ -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,