From 8a9cc7885c62b549ef74f7886e928012c05abe86 Mon Sep 17 00:00:00 2001 From: Lei Jin Date: Tue, 8 Jul 2014 12:48:10 -0700 Subject: [PATCH] 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 --- db/internal_stats.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/internal_stats.cc b/db/internal_stats.cc index e8b22a7f8..c75481d11 100644 --- a/db/internal_stats.cc +++ b/db/internal_stats.cc @@ -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);