utime_t too_old = now;
too_old -= cct->_conf->op_tracker_complaint_time;
- utime_t oldest_secs = now - ops_in_flight.front()->received_time;
+ utime_t oldest_secs = now - ops_in_flight.front()->get_arrived();
dout(10) << "ops_in_flight.size: " << ops_in_flight.size()
<< "; oldest is " << oldest_secs
int slow = 0; // total slow
int warned = 0; // total logged
- while (!i.end() && (*i)->received_time < too_old) {
+ while (!i.end() && (*i)->get_arrived() < too_old) {
slow++;
// exponential backoff of warning intervals
- if (((*i)->received_time +
+ if (((*i)->get_arrived() +
(cct->_conf->op_tracker_complaint_time *
(*i)->warn_interval_multiplier)) < now) {
// will warn
if (warned > cct->_conf->op_tracker_log_threshold)
break;
- utime_t age = now - (*i)->received_time;
+ utime_t age = now - (*i)->get_arrived();
stringstream ss;
- ss << "slow request " << age << " seconds old, received at " << (*i)->received_time
+ ss << "slow request " << age << " seconds old, received at " << (*i)->get_arrived()
<< ": " << *((*i)->request) << " currently "
<< ((*i)->current.size() ? (*i)->current : (*i)->state_string());
warning_vector.push_back(ss.str());
uint32_t lb = 1 << (bin-1); // lower bound for this bin
int count = 0;
for (xlist<TrackedOp*>::iterator i = ops_in_flight.begin(); !i.end(); ++i) {
- utime_t age = now - (*i)->received_time;
+ utime_t age = now - (*i)->get_arrived();
uint32_t ms = (long)(age * 1000.0);
if (ms >= lb) {
count++;
list<pair<utime_t, string> > events; /// list of events and their times
Mutex lock; /// to protect the events list
- utime_t received_time; /// the time the triggering Message was received
string current; /// the current state the event is in
uint64_t seq; /// a unique value set by the OpTracker
seq(0),
warn_interval_multiplier(1)
{
- received_time = request->get_recv_stamp();
tracker->register_inflight_op(&xitem);
}
virtual ~TrackedOp() { assert(request); request->put(); }
utime_t get_arrived() const {
- return received_time;
+ return request->get_recv_stamp();
}
// This function maybe needs some work; assumes last event is completion time
double get_duration() const {
return events.size() ?
- (events.rbegin()->first - received_time) :
+ (events.rbegin()->first - get_arrived()) :
0.0;
}
Message *get_req() const { return request; }
m->print(name);
f->dump_string("description", name.str().c_str()); // this OpRequest
f->dump_unsigned("rmw_flags", rmw_flags);
- f->dump_stream("received_at") << received_time;
- f->dump_float("age", now - received_time);
+ f->dump_stream("received_at") << get_arrived();
+ f->dump_float("age", now - get_arrived());
f->dump_float("duration", get_duration());
f->dump_string("flag_point", state_string());
if (m->get_orig_source().is_client()) {