]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluefs: add interface to dump perf counters to formatter
authorVarada Kari <varada.kari@sandisk.com>
Thu, 22 Dec 2016 09:41:40 +0000 (15:11 +0530)
committerVarada Kari <varada.kari@sandisk.com>
Thu, 12 Jan 2017 08:22:02 +0000 (13:52 +0530)
Signed-off-by: Varada Kari <varada.kari@sandisk.com>
src/os/bluestore/BlueFS.cc
src/os/bluestore/BlueFS.h

index f193b3e3d7b7fd127b33633a8683e70d9490daa4..e8723be78c0cf45bf0cfeb7d6eea1054432cc7ed 100644 (file)
@@ -228,6 +228,14 @@ uint64_t BlueFS::get_free(unsigned id)
   return alloc[id]->get_free();
 }
 
+void BlueFS::dump_perf_counters(Formatter *f)
+{
+  f->open_object_section("bluefs_perf_counters");
+  logger->dump_formatted(f,0);
+  f->close_section();
+}
+
+
 void BlueFS::get_usage(vector<pair<uint64_t,uint64_t>> *usage)
 {
   std::lock_guard<std::mutex> l(lock);
index f9754306e5008e97d07a9299eefa2f76e793d6d3..bd2490997432a626e117c420784731deae80d0ad 100644 (file)
@@ -337,6 +337,7 @@ public:
   uint64_t get_total(unsigned id);
   uint64_t get_free(unsigned id);
   void get_usage(vector<pair<uint64_t,uint64_t>> *usage); // [<free,total> ...]
+  void dump_perf_counters(Formatter *f);
 
   /// get current extents that we own for given block device
   int get_block_extents(unsigned id, interval_set<uint64_t> *extents);