]> 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)
committerroot <varao@redhat.com>
Tue, 17 Sep 2019 15:31:32 +0000 (21:01 +0530)
Fixes: https://tracker.ceph.com/issues/40821
Signed-off-by: Varsha Rao <varao@redhat.com>
src/osdc/Objecter.cc

index d350ef405bf7522b957250d2d2fd8f36e917e088..c5389d12b0f480beee0be077d567f18e4060ffa1 100644 (file)
@@ -4539,10 +4539,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;