File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -5675,10 +5675,13 @@ void Monitor::handle_scrub(MonOpRequestRef op)
56755675 if (scrub_result.size () == quorum.size ()) {
56765676 scrub_check_results ();
56775677 scrub_result.clear ();
5678- if (scrub_state->finished )
5678+ if (scrub_state->finished ) {
5679+ const utime_t lat = ceph_clock_now () - scrub_state->start ;
5680+ dout (10 ) << __func__ << " mon scrub latency: " << lat << dendl;
56795681 scrub_finish ();
5680- else
5682+ } else {
56815683 scrub ();
5684+ }
56825685 }
56835686 }
56845687 break ;
Original file line number Diff line number Diff line change @@ -342,8 +342,10 @@ class Monitor : public Dispatcher,
342342 struct ScrubState {
343343 std::pair<std::string,std::string> last_key; // /< last scrubbed key
344344 bool finished;
345+ const utime_t start;
345346
346- ScrubState () : finished(false ) { }
347+ ScrubState () : finished(false ),
348+ start (ceph_clock_now()) { }
347349 virtual ~ScrubState () { }
348350 };
349351 std::shared_ptr<ScrubState> scrub_state; // /< keeps track of current scrub
You can’t perform that action at this time.
0 commit comments