dc_stats_auto_runtime_probe::~dc_stats_auto_runtime_probe() { if (this->probe) { double now = _condor_debug_get_time_double(); this->probe->Add(now - this->begin); } }
double DaemonCore::Stats::AddRuntimeSample(const char * name, int as, double before) // returns current time. { if ( ! this->enabled) return; double now = _condor_debug_get_time_double(); this->AddSample(name, as, now - before); return now; }
double DaemonCore::Stats::AddRuntime(const char * name, double before) { double now = _condor_debug_get_time_double(); if ( ! this->enabled) return now; stats_entry_probe<double> * probe = Pool.GetProbe< stats_entry_probe<double> >(name); if (probe) probe->Add(now - before); return now; }
double DaemonCore::Stats::AddRuntime(const char * name, double before) { if ( ! this->enabled) return; double now = _condor_debug_get_time_double(); stats_recent_counter_timer * probe = Pool.GetProbe<stats_recent_counter_timer>(name); if (probe) probe->Add(now - before); return now; }
int ipv6_getaddrinfo(const char *node, const char *service, addrinfo_iterator& ai, const addrinfo& hint) { addrinfo* res = NULL; double begin = _condor_debug_get_time_double(); int e = getaddrinfo(node, service, &hint, &res ); double timediff = _condor_debug_get_time_double() - begin; getaddrinfo_runtime += timediff; if (e!=0) { getaddrinfo_fail_runtime += timediff; return e; } if (timediff > getaddrinfo_slow_limit) { getaddrinfo_slow_runtime += timediff; if (getaddrinfo_slow_callback) getaddrinfo_slow_callback(node, service, timediff); } else { getaddrinfo_fast_runtime += timediff; } ai = addrinfo_iterator(res); return 0; }
dc_stats_auto_runtime_probe::dc_stats_auto_runtime_probe(const char * name, int as) { if ( ! daemonCore->dc_stats.enabled) { this->probe = NULL; return; } StatisticsPool * pool = &daemonCore->dc_stats.Pool; this->probe = pool->GetProbe< stats_entry_recent<Probe> >(name); if ( ! this->probe) { MyString attr("DC_Func"); attr += name; cleanStringForUseAsAttr(attr); int as_pub = as | stats_entry_recent<Probe>::PubValueAndRecent; this->probe = pool->NewProbe< stats_entry_recent<Probe> >(name, attr.Value(), as_pub); if (this->probe) { this->probe->SetRecentMax(daemonCore->dc_stats.RecentWindowMax / daemonCore->dc_stats.RecentWindowQuantum); } } if (this->probe) this->begin = _condor_debug_get_time_double(); }
double current_time() const { return _condor_debug_get_time_double(); }