From: Varsha Rao Date: Thu, 22 Aug 2019 13:45:35 +0000 (+0530) Subject: osdc/Objecter: Add age to the ops X-Git-Tag: v12.2.14~10^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=32ab879084c674ebbc9fb80a33faa41c5b5561af;p=ceph.git osdc/Objecter: Add age to the ops Fixes: https://tracker.ceph.com/issues/40821 Signed-off-by: Varsha Rao (cherry picked from commit ed7ebb198808ab8fb8f76c1663d514d406572fed) Conflicts: src/osdc/Objecter.cc: changed coarse_mono_clock to mono_clock to make types compatible. --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index ca4a10046af70..f16567c7fc299 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -4538,10 +4538,12 @@ void Objecter::_dump_ops(const OSDSession *s, Formatter *fmt) p != s->ops.end(); ++p) { Op *op = p->second; + auto age = std::chrono::duration(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;