report correct interval amplification

Summary: as title

Test Plan: make release

Reviewers: sdong, yhchiang, igor

Reviewed By: igor

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D19515
This commit is contained in:
Lei Jin 2014-07-08 12:48:10 -07:00
parent 534357ca3a
commit 8a9cc7885c
1 changed files with 2 additions and 2 deletions

View File

@ -294,9 +294,9 @@ bool InternalStats::GetProperty(DBPropertyType property_type,
snprintf(
buf, sizeof(buf),
"Amplification interval: %.1f write, %.1f compaction\n",
(double)(interval_bytes_written + wal_bytes) /
(double)(interval_bytes_written + interval_wal_bytes) /
(interval_bytes_new + 1),
(double)(interval_bytes_written + interval_bytes_read + wal_bytes) /
(double)(interval_bytes_written + interval_bytes_read + interval_wal_bytes) /
(interval_bytes_new + 1));
value->append(buf);