Fix compaction IO stats to handle large file counts

Summary:
The output did not have space for 6-digit file counts or for 3-digit
counts of files being compacted. This adds space for that while preserving
existing alignment. See https://gist.github.com/mdcallag/0a61c6a18dd467224c11

Task ID: #

Blame Rev:

Test Plan:
run db_bench, look at output

Revert Plan:

Database Impact:

Memcache Impact:

Other Notes:

EImportant:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Reviewers: igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D35091
main
Mark Callaghan 10 years ago
parent eafa1bfc3c
commit 56337faf3e
  1. 2
      db/internal_stats.cc

@ -52,7 +52,7 @@ void PrintLevelStats(char* buf, size_t len, const std::string& name,
NumberToHumanString(stats.num_dropped_records); NumberToHumanString(stats.num_dropped_records);
snprintf(buf, len, snprintf(buf, len,
"%4s %5d/%-3d %8.0f %5.1f " /* Level, Files, Size(MB), Score */ "%4s %6d/%-3d %8.0f %5.1f " /* Level, Files, Size(MB), Score */
"%8.1f " /* Read(GB) */ "%8.1f " /* Read(GB) */
"%7.1f " /* Rn(GB) */ "%7.1f " /* Rn(GB) */
"%8.1f " /* Rnp1(GB) */ "%8.1f " /* Rnp1(GB) */

Loading…
Cancel
Save