From: Igor Fedotov Date: Thu, 23 May 2019 13:48:27 +0000 (+0300) Subject: common/perf_conters: make dump_formatted_xxx funcs as const. X-Git-Tag: v15.1.0~2437^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37ff97523d45788af74b4d8986ed116c22367ce5;p=ceph.git common/perf_conters: make dump_formatted_xxx funcs as const. Signed-off-by: Igor Fedotov --- diff --git a/src/common/perf_counters.cc b/src/common/perf_counters.cc index 0c57c02482b4..36105b0e6b91 100644 --- a/src/common/perf_counters.cc +++ b/src/common/perf_counters.cc @@ -126,7 +126,7 @@ void PerfCountersCollectionImpl::dump_formatted_generic( bool schema, bool histograms, const std::string &logger, - const std::string &counter) + const std::string &counter) const { f->open_object_section("perfcounter_collection"); @@ -350,7 +350,7 @@ void PerfCounters::reset() } void PerfCounters::dump_formatted_generic(Formatter *f, bool schema, - bool histograms, const std::string &counter) + bool histograms, const std::string &counter) const { f->open_object_section(m_name.c_str()); diff --git a/src/common/perf_counters.h b/src/common/perf_counters.h index 8373db75e1ba..8936468d910b 100644 --- a/src/common/perf_counters.h +++ b/src/common/perf_counters.h @@ -243,11 +243,11 @@ public: void reset(); void dump_formatted(ceph::Formatter *f, bool schema, - const std::string &counter = "") { + const std::string &counter = "") const { dump_formatted_generic(f, schema, false, counter); } void dump_formatted_histograms(ceph::Formatter *f, bool schema, - const std::string &counter = "") { + const std::string &counter = "") const { dump_formatted_generic(f, schema, true, counter); } std::pair get_tavg_ns(int idx) const; @@ -274,7 +274,7 @@ private: PerfCounters(const PerfCounters &rhs); PerfCounters& operator=(const PerfCounters &rhs); void dump_formatted_generic(ceph::Formatter *f, bool schema, bool histograms, - const std::string &counter = ""); + const std::string &counter = "") const; typedef std::vector perf_counter_data_vec_t; @@ -321,13 +321,13 @@ public: void dump_formatted(ceph::Formatter *f, bool schema, const std::string &logger = "", - const std::string &counter = "") { + const std::string &counter = "") const { dump_formatted_generic(f, schema, false, logger, counter); } void dump_formatted_histograms(ceph::Formatter *f, bool schema, const std::string &logger = "", - const std::string &counter = "") { + const std::string &counter = "") const { dump_formatted_generic(f, schema, true, logger, counter); } @@ -348,7 +348,7 @@ public: private: void dump_formatted_generic(ceph::Formatter *f, bool schema, bool histograms, const std::string &logger = "", - const std::string &counter = ""); + const std::string &counter = "") const; perf_counters_set_t m_loggers;