Skip to content

Commit

Permalink
Merge pull request #4278 from facebook/bench_x100
Browse files Browse the repository at this point in the history
bench: better result alignment
  • Loading branch information
Cyan4973 authored Jan 31, 2025
2 parents 283fbd2 + 60f84f7 commit b55ff3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions programs/benchzstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ static BMK_benchOutcome_t BMK_benchMemAdvancedNoAlloc(
}

{
int const ratioAccuracy = (ratio < 10.) ? 3 : 2;
int const ratioDigits = 1 + (ratio < 100.) + (ratio < 10.);
assert(cSize < UINT_MAX);
OUTPUTLEVEL(
2,
Expand All @@ -642,7 +642,7 @@ static BMK_benchOutcome_t BMK_benchMemAdvancedNoAlloc(
displayName,
(unsigned)srcSize,
(unsigned)cSize,
ratioAccuracy,
ratioDigits,
ratio,
benchResult.cSpeed < (10 * MB_UNIT) ? 2 : 1,
(double)benchResult.cSpeed / MB_UNIT);
Expand All @@ -669,15 +669,15 @@ static BMK_benchOutcome_t BMK_benchMemAdvancedNoAlloc(
}

{
int const ratioAccuracy = (ratio < 10.) ? 3 : 2;
int const ratioDigits = 1 + (ratio < 100.) + (ratio < 10.);
OUTPUTLEVEL(
2,
"%2s-%-17.17s :%10u ->%10u (x%5.*f), %6.*f MB/s, %6.1f MB/s\r",
marks[markNb],
displayName,
(unsigned)srcSize,
(unsigned)cSize,
ratioAccuracy,
ratioDigits,
ratio,
benchResult.cSpeed < (10 * MB_UNIT) ? 2 : 1,
(double)benchResult.cSpeed / MB_UNIT,
Expand Down

0 comments on commit b55ff3c

Please sign in to comment.