h->set_bin(bin, count);
}
-void OpTracker::mark_event(TrackedOp *op, const string &dest)
+void OpTracker::mark_event(TrackedOp *op, const string &dest, utime_t time)
{
if (!tracking_enabled)
return;
- utime_t now = ceph_clock_now(cct);
- return _mark_event(op, dest, now);
+ return _mark_event(op, dest, time);
}
void OpTracker::_mark_event(TrackedOp *op, const string &evt,
OpHistory history;
float complaint_time;
int log_threshold;
+ void _mark_event(TrackedOp *op, const string &evt, utime_t now);
public:
bool tracking_enabled;
* @return True if there are any Ops to warn on, false otherwise.
*/
bool check_ops_in_flight(std::vector<string> &warning_strings);
- void mark_event(TrackedOp *op, const string &evt);
- void _mark_event(TrackedOp *op, const string &evt, utime_t now);
+ void mark_event(TrackedOp *op, const string &evt,
+ utime_t time = ceph_clock_now(g_ceph_context));
void on_shutdown() {
Mutex::Locker l(ops_in_flight_lock);
waited_for_osdmap(false), _more(NULL) {
in[0] = in[1] = NULL;
if (!params.throttled.is_zero())
- tracker->_mark_event(this, "throttled", params.throttled);
+ tracker->mark_event(this, "throttled", params.throttled);
if (!params.all_read.is_zero())
- tracker->_mark_event(this, "all_read", params.all_read);
+ tracker->mark_event(this, "all_read", params.all_read);
if (!params.dispatched.is_zero())
- tracker->_mark_event(this, "dispatched", params.dispatched);
+ tracker->mark_event(this, "dispatched", params.dispatched);
}
~MDRequestImpl();
} else if (req->get_type() == MSG_OSD_SUBOP) {
reqid = static_cast<MOSDSubOp*>(req)->reqid;
}
- tracker->_mark_event(this, "header_read", request->get_recv_stamp());
- tracker->_mark_event(this, "throttled", request->get_throttle_stamp());
- tracker->_mark_event(this, "all_read", request->get_recv_complete_stamp());
- tracker->_mark_event(this, "dispatched", request->get_dispatch_stamp());
+ tracker->mark_event(this, "header_read", request->get_recv_stamp());
+ tracker->mark_event(this, "throttled", request->get_throttle_stamp());
+ tracker->mark_event(this, "all_read", request->get_recv_complete_stamp());
+ tracker->mark_event(this, "dispatched", request->get_dispatch_stamp());
}
void OpRequest::_dump(utime_t now, Formatter *f) const