Skip to content

Commit

Permalink
del if
Browse files Browse the repository at this point in the history
  • Loading branch information
foreverneverer committed Jun 5, 2020
1 parent 8f89535 commit 7aa5ff2
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/server/pegasus_server_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 7aa5ff2

Please sign in to comment.