]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/perf_conters: make dump_formatted_xxx funcs as const.
authorIgor Fedotov <ifedotov@suse.com>
Thu, 23 May 2019 13:48:27 +0000 (16:48 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 23 May 2019 14:08:19 +0000 (17:08 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/common/perf_counters.cc
src/common/perf_counters.h

index 0c57c02482b4de2f9dafd1c08475ec967ca5cc27..36105b0e6b91917a32be28ab2f75c15e967a062e 100644 (file)
@@ -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());
   
index 8373db75e1ba97bc31a93d5e5bd536382842f035..8936468d910b3626e0fdd44a1ee3ace11859c244 100644 (file)
@@ -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<uint64_t, uint64_t> 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_any_d> 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;