diff --git a/include/dsn/perf_counter/perf_counters.h b/include/dsn/perf_counter/perf_counters.h index 592633368f..61773fed28 100644 --- a/include/dsn/perf_counter/perf_counters.h +++ b/include/dsn/perf_counter/perf_counters.h @@ -146,6 +146,9 @@ class perf_counters : public dsn::utils::singleton bool updated_recently{false}; }; std::unordered_map _snapshots; + + // timestamp in seconds when take snapshot of current counters + int64_t _timestamp; }; } // end namespace dsn::utils diff --git a/src/core/perf_counter/perf_counters.cpp b/src/core/perf_counter/perf_counters.cpp index 9cedd2d1dc..826893a319 100644 --- a/src/core/perf_counter/perf_counters.cpp +++ b/src/core/perf_counter/perf_counters.cpp @@ -201,7 +201,7 @@ std::string perf_counters::list_snapshot_by_regexp(const std::vector old_counters; for (auto &p : _snapshots)