From 7aa5ff24569615b8f1f0a4089d0e4d1a5f1aebfb Mon Sep 17 00:00:00 2001 From: JiaShuo Date: Fri, 5 Jun 2020 15:11:25 +0800 Subject: [PATCH] del if --- src/server/pegasus_server_impl.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/server/pegasus_server_impl.cpp b/src/server/pegasus_server_impl.cpp index 3f5a344857..2f722720be 100644 --- a/src/server/pegasus_server_impl.cpp +++ b/src/server/pegasus_server_impl.cpp @@ -2144,17 +2144,12 @@ void pegasus_server_impl::update_server_rocksdb_rate_limiter_statistics( std::chrono::seconds update_rdb_stat_short_interval) { // Update _pfc_rdb_write_limiter_rate_bytes - if (_s_rate_limiter) { - uint64_t current_total_through = _s_rate_limiter->GetTotalBytesThrough(); - uint64_t through_rate_per_sec = - (current_total_through - _rocksdb_limiter_last_total_through) / - update_rdb_stat_short_interval.count(); - _pfc_rdb_write_limiter_rate_bytes->set(through_rate_per_sec); - _rocksdb_limiter_last_total_through = current_total_through; - dinfo_f("_pfc_rdb_write_limiter_rate_bytes: {} bytes", through_rate_per_sec); - } else { - dinfo_f("_pfc_rdb_write_limiter_rate_bytes is 0 bytes because it is disabled"); - } + uint64_t current_total_through = _s_rate_limiter->GetTotalBytesThrough(); + uint64_t through_rate_per_sec = (current_total_through - _rocksdb_limiter_last_total_through) / + update_rdb_stat_short_interval.count(); + _pfc_rdb_write_limiter_rate_bytes->set(through_rate_per_sec); + _rocksdb_limiter_last_total_through = current_total_through; + dinfo_f("_pfc_rdb_write_limiter_rate_bytes: {} bytes", through_rate_per_sec); } void pegasus_server_impl::update_replica_rocksdb_compaction_statistics()