Skip to content

Commit

Permalink
common: simplify loop
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Donnelly <[email protected]>
  • Loading branch information
batrick committed Mar 20, 2024
1 parent 8928a12 commit cdef9b6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/common/TrackedOp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,11 @@ void OpHistory::dump_slow_ops(utime_t now, Formatter *f, set<string> filters)
f->dump_int("threshold to keep", history_slow_op_threshold.load());
{
f->open_array_section("Ops");
for (set<pair<utime_t, TrackedOpRef> >::const_iterator i =
slow_op.begin();
i != slow_op.end();
++i) {
if (!i->second->filter_out(filters))
for (const auto& [t, op] : slow_op) {
if (!op->filter_out(filters))
continue;
f->open_object_section("Op");
i->second->dump(now, f, OpTracker::default_dumper);
op->dump(now, f, OpTracker::default_dumper);
f->close_section();
}
f->close_section();
Expand Down

0 comments on commit cdef9b6

Please sign in to comment.