]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd_types: op_queue_age_hist and fs_perf_stat should be in osd_stat_t::operator== 4028/head
authorSamuel Just <sjust@redhat.com>
Fri, 5 Dec 2014 23:29:52 +0000 (15:29 -0800)
committerLoic Dachary <ldachary@redhat.com>
Tue, 17 Mar 2015 10:01:10 +0000 (11:01 +0100)
Fixes: 10259
Backport: giant, firefly, dumpling
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 1ac17c0a662e6079c2c57edde2b4dc947f547f57)

src/common/histogram.h
src/osd/osd_types.h

index bdbd75ca132a2cdaaa7ff3fbdebab0fd47f8b5c8..520b516eed5a2527ef52cbeeaab71fe759d29896 100644 (file)
@@ -74,6 +74,10 @@ public:
     return b;
   }
 
+  bool operator==(const pow2_hist_t &r) const {
+    return h == r.h;
+  }
+
   /// get a value's position in the histogram.
   ///
   /// positions are represented as values in the range [0..1000000]
index fcb51f0e9adaabf99898ebb886ac66e125be3b8f..51c99dcedc3a96afa2ee52a6a7de5fd24d2f367b 100644 (file)
@@ -655,6 +655,11 @@ struct objectstore_perf_stat_t {
   objectstore_perf_stat_t() :
     filestore_commit_latency(0), filestore_apply_latency(0) {}
 
+  bool operator==(const objectstore_perf_stat_t &r) const {
+    return filestore_commit_latency == r.filestore_commit_latency &&
+      filestore_apply_latency == r.filestore_apply_latency;
+  }
+
   void add(const objectstore_perf_stat_t &o) {
     filestore_commit_latency += o.filestore_commit_latency;
     filestore_apply_latency += o.filestore_apply_latency;
@@ -718,7 +723,9 @@ inline bool operator==(const osd_stat_t& l, const osd_stat_t& r) {
     l.snap_trim_queue_len == r.snap_trim_queue_len &&
     l.num_snap_trimming == r.num_snap_trimming &&
     l.hb_in == r.hb_in &&
-    l.hb_out == r.hb_out;
+    l.hb_out == r.hb_out &&
+    l.op_queue_age_hist == r.op_queue_age_hist &&
+    l.fs_perf_stat == r.fs_perf_stat;
 }
 inline bool operator!=(const osd_stat_t& l, const osd_stat_t& r) {
   return !(l == r);