]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: Add age to the ops
authorVarsha Rao <varao@redhat.com>
Thu, 22 Aug 2019 13:45:35 +0000 (19:15 +0530)
committerNathan Cutler <ncutler@suse.com>
Wed, 23 Oct 2019 12:36:18 +0000 (14:36 +0200)
Fixes: https://tracker.ceph.com/issues/40821
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit ed7ebb198808ab8fb8f76c1663d514d406572fed)

src/osdc/Objecter.cc

index 0c172c9551879556f28320f452cb25dcd39695c4..bc39114ac596c64a2a15410a40f29bbe4d9a5892 100644 (file)
@@ -4517,10 +4517,12 @@ void Objecter::_dump_ops(const OSDSession *s, Formatter *fmt)
        p != s->ops.end();
        ++p) {
     Op *op = p->second;
+    auto age = std::chrono::duration<double>(coarse_mono_clock::now() - op->stamp);
     fmt->open_object_section("op");
     fmt->dump_unsigned("tid", op->tid);
     op->target.dump(fmt);
     fmt->dump_stream("last_sent") << op->stamp;
+    fmt->dump_float("age", age.count());
     fmt->dump_int("attempts", op->attempts);
     fmt->dump_stream("snapid") << op->snapid;
     fmt->dump_stream("snap_context") << op->snapc;