MOD: trim last space and comma in perf context and iostat context ToString()
Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/5755 Differential Revision: D17165190 Pulled By: riversand963 fbshipit-source-id: a3a4633961bfe019bf360f97a4c4d36464e7fa0b
This commit is contained in:
parent
979fbdc696
commit
cdb6334e68
@ -54,7 +54,9 @@ std::string IOStatsContext::ToString(bool exclude_zero_counters) const {
|
|||||||
IOSTATS_CONTEXT_OUTPUT(prepare_write_nanos);
|
IOSTATS_CONTEXT_OUTPUT(prepare_write_nanos);
|
||||||
IOSTATS_CONTEXT_OUTPUT(logger_nanos);
|
IOSTATS_CONTEXT_OUTPUT(logger_nanos);
|
||||||
|
|
||||||
return ss.str();
|
std::string str = ss.str();
|
||||||
|
str.erase(str.find_last_not_of(", ") + 1);
|
||||||
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace rocksdb
|
} // namespace rocksdb
|
||||||
|
@ -529,7 +529,10 @@ std::string PerfContext::ToString(bool exclude_zero_counters) const {
|
|||||||
PERF_CONTEXT_BY_LEVEL_OUTPUT_ONE_COUNTER(bloom_filter_full_true_positive);
|
PERF_CONTEXT_BY_LEVEL_OUTPUT_ONE_COUNTER(bloom_filter_full_true_positive);
|
||||||
PERF_CONTEXT_BY_LEVEL_OUTPUT_ONE_COUNTER(block_cache_hit_count);
|
PERF_CONTEXT_BY_LEVEL_OUTPUT_ONE_COUNTER(block_cache_hit_count);
|
||||||
PERF_CONTEXT_BY_LEVEL_OUTPUT_ONE_COUNTER(block_cache_miss_count);
|
PERF_CONTEXT_BY_LEVEL_OUTPUT_ONE_COUNTER(block_cache_miss_count);
|
||||||
return ss.str();
|
|
||||||
|
std::string str = ss.str();
|
||||||
|
str.erase(str.find_last_not_of(", ") + 1);
|
||||||
|
return str;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user