Skip to content

Commit

Permalink
Build/Test Tools: Do not round percentages when comparing performance…
Browse files Browse the repository at this point in the history
… test results.

Props joemcgill.
See #59517.

git-svn-id: https://develop.svn.wordpress.org/trunk@56934 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
swissspidy committed Oct 13, 2023
1 parent c2409fe commit 9d1c581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/performance/compare-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ for ( const key of testSuites ) {
const prevValue = median( prev[ metric ] );

const delta = value - prevValue;
const percentage = Math.round( ( delta / value ) * 100 );
const percentage = ( delta / value ) * 100;
rows.push( {
Metric: metric,
Before: `${ prevValue.toFixed( 2 ) } ms`,
Expand Down

0 comments on commit 9d1c581

Please sign in to comment.