// static logger
Mutex client_logger_lock("client_logger_lock");
-PerfCounters *client_logger = 0;
+PerfCounters *client_counters = 0;
gethostname(hostname, 79);
snprintf(s, sizeof(s), "clients.%s.%d", hostname, getpid());
PerfCountersBuilder plb(cct, s, l_c_first, l_c_last);
- if (client_logger == 0) {
+ if (client_counters == 0) {
plb.add_fl_avg(l_c_reply, "reply");
plb.add_fl_avg(l_c_lat, "lat");
plb.add_fl_avg(l_c_wrlat, "wrlat");
plb.add_fl_avg(l_c_owrlat, "owrlat");
plb.add_fl_avg(l_c_ordlat, "ordlat");
- client_logger = plb.create_perf_counters();
+ client_counters = plb.create_perf_counters();
}
client_logger_lock.Unlock();
}
request->dispatch_cond = 0;
// -- log times --
- if (client_logger) {
+ if (client_counters) {
utime_t lat = ceph_clock_now(cct);
lat -= request->sent_stamp;
ldout(cct, 20) << "lat " << lat << dendl;
- client_logger->fset(l_c_lat,(double)lat);
- client_logger->fset(l_c_reply,(double)lat);
+ client_counters->fset(l_c_lat,(double)lat);
+ client_counters->fset(l_c_reply,(double)lat);
}
request->put();
// time
utime_t lat = ceph_clock_now(cct);
lat -= start;
- if (client_logger)
- client_logger->fset(l_c_wrlat,(double)lat);
+ if (client_counters)
+ client_counters->fset(l_c_wrlat,(double)lat);
// assume success for now. FIXME.
uint64_t totalwritten = size;
lat -= start;
dout(0) << " trace " << tfile << " loop " << (i+1) << "/" << iarg1 << " done in " << (double)lat << " seconds" << dendl;
- if (client_logger
+ if (client_counters
&& i > 0
&& i < iarg1-1
) {
- //client_logger->finc("trsum", (double)lat);
- //client_logger->inc("trnum");
+ //client_counters->finc("trsum", (double)lat);
+ //client_counters->inc("trnum");
}
}
dout(1) << "done " << dendl;
utime_t lat = ceph_clock_now(g_ceph_context);
lat -= start;
- if (client_logger) {
+ if (client_counters) {
if (write)
- client_logger->fset(l_c_owrlat, lat);
+ client_counters->fset(l_c_owrlat, lat);
else
- client_logger->fset(l_c_ordlat, lat);
+ client_counters->fset(l_c_ordlat, lat);
}
}