]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/objectstore: add access to objectstore's performance counters from UT
authorIgor Fedotov <ifedotov@mirantis.com>
Tue, 29 Nov 2016 15:20:29 +0000 (15:20 +0000)
committerIgor Fedotov <ifedotov@mirantis.com>
Thu, 2 Feb 2017 15:22:50 +0000 (15:22 +0000)
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
src/os/ObjectStore.h
src/os/bluestore/BlueStore.h
src/os/filestore/FileStore.h
src/os/kstore/KStore.h
src/os/memstore/MemStore.h

index 85a8f1970d17ed6a55599c82f9c8a8b459e4d99b..bb8e3f0331357193595000f98f345930e8f6c8db 100644 (file)
@@ -108,6 +108,14 @@ public:
    */
   virtual objectstore_perf_stat_t get_cur_stats() = 0;
 
+  /**
+   * Fetch Object Store performance counters.
+   *
+   *
+   * This appears to be called with nothing locked.
+   */
+  virtual const PerfCounters* get_perf_counters() const = 0;
+
   /**
    * a sequencer orders transactions
    *
index 3c3bdb00e0d36706b8acdf9ac677bfbcfebddc53..c5e9160b4bf10a4b91b192d8376d1fd5c19ac905 100644 (file)
@@ -2154,6 +2154,9 @@ public:
     perf_tracker.update_from_perfcounters(*logger);
     return perf_tracker.get_cur_stats();
   }
+  const PerfCounters* get_perf_counters() const {
+    return logger;
+  }
 
   int queue_transactions(
     Sequencer *osr,
index ac57de7998a51d7104eeb33907a47b8e927aa090..34eff77d15cfef0dc9738060d943138f9668acfe 100644 (file)
@@ -141,6 +141,9 @@ public:
     perf_tracker.update_from_perfcounters(*logger);
     return perf_tracker.get_cur_stats();
   }
+  const PerfCounters* get_perf_counters() const {
+    return logger;
+  }
 
 private:
   string internal_name;         ///< internal name, used to name the perfcounter instance
index c4acd16590bdba9fb9a4146a9c5e39df8b36097f..4db1096facb30d1f3a7e617a0d533931a5fca200 100644 (file)
@@ -553,6 +553,10 @@ public:
   objectstore_perf_stat_t get_cur_stats() {
     return objectstore_perf_stat_t();
   }
+  const PerfCounters* get_perf_counters() const {
+    return logger;
+  }
+
 
   int queue_transactions(
     Sequencer *osr,
index ee1dadafd79b1634cfafce44d2ad95513aaa9544..5f20e37334e16f8f78d69e7f8f8cfb11d0f4eb3a 100644 (file)
@@ -385,6 +385,11 @@ public:
 
   objectstore_perf_stat_t get_cur_stats() override;
 
+  const PerfCounters* get_perf_counters() const {
+    return nullptr;
+  }
+
+
   int queue_transactions(
     Sequencer *osr, vector<Transaction>& tls,
     TrackedOpRef op = TrackedOpRef(),