From b2c48a570f36a91715deca3a62a7def310d651c8 Mon Sep 17 00:00:00 2001 From: darionyaphet Date: Tue, 6 Apr 2021 00:30:57 -0700 Subject: [PATCH] Support cpu_write_nanos and cpu_read_nanos in IOStatsContext (#8149) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/8149 Reviewed By: ajkr Differential Revision: D27571017 Pulled By: riversand963 fbshipit-source-id: a73427e907a7cb899debf55d60a2ede726695277 --- monitoring/iostats_context.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monitoring/iostats_context.cc b/monitoring/iostats_context.cc index 2960f05e8..6be681b6e 100644 --- a/monitoring/iostats_context.cc +++ b/monitoring/iostats_context.cc @@ -33,6 +33,8 @@ void IOStatsContext::Reset() { prepare_write_nanos = 0; fsync_nanos = 0; logger_nanos = 0; + cpu_write_nanos = 0; + cpu_read_nanos = 0; } #define IOSTATS_CONTEXT_OUTPUT(counter) \ @@ -53,6 +55,8 @@ std::string IOStatsContext::ToString(bool exclude_zero_counters) const { IOSTATS_CONTEXT_OUTPUT(fsync_nanos); IOSTATS_CONTEXT_OUTPUT(prepare_write_nanos); IOSTATS_CONTEXT_OUTPUT(logger_nanos); + IOSTATS_CONTEXT_OUTPUT(cpu_write_nanos); + IOSTATS_CONTEXT_OUTPUT(cpu_read_nanos); std::string str = ss.str(); str.erase(str.find_last_not_of(", ") + 1);