return exp(x) - 1.0;
}
+void
+StatHist::logInit(int capacity, double min, double max)
+{
+ init(capacity, Math::Log, Math::Exp, min, max);
+}
+
void
statHistLogInit(StatHist * H, int capacity, double min, double max)
{
- H->init(capacity, Math::Log, Math::Exp, min, max);
+ H->logInit(capacity, min, max);
}
/* linear histogram for enums */
/*
* HTTP svc_time hist is kept in milli-seconds; max of 3 hours.
*/
- statHistLogInit(&C->client_http.all_svc_time, 300, 0.0, 3600000.0 * 3.0);
- statHistLogInit(&C->client_http.miss_svc_time, 300, 0.0, 3600000.0 * 3.0);
- statHistLogInit(&C->client_http.nm_svc_time, 300, 0.0, 3600000.0 * 3.0);
- statHistLogInit(&C->client_http.nh_svc_time, 300, 0.0, 3600000.0 * 3.0);
- statHistLogInit(&C->client_http.hit_svc_time, 300, 0.0, 3600000.0 * 3.0);
+ C->client_http.all_svc_time.logInit(300, 0.0, 3600000.0 * 3.0);
+ C->client_http.miss_svc_time.logInit(300, 0.0, 3600000.0 * 3.0);
+ C->client_http.nm_svc_time.logInit(300, 0.0, 3600000.0 * 3.0);
+ C->client_http.nh_svc_time.logInit(300, 0.0, 3600000.0 * 3.0);
+ C->client_http.hit_svc_time.logInit(300, 0.0, 3600000.0 * 3.0);
/*
* ICP svc_time hist is kept in micro-seconds; max of 1 minute.
*/
- statHistLogInit(&C->icp.query_svc_time, 300, 0.0, 1000000.0 * 60.0);
- statHistLogInit(&C->icp.reply_svc_time, 300, 0.0, 1000000.0 * 60.0);
+ C->icp.query_svc_time.logInit(300, 0.0, 1000000.0 * 60.0);
+ C->icp.reply_svc_time.logInit(300, 0.0, 1000000.0 * 60.0);
/*
* DNS svc_time hist is kept in milli-seconds; max of 10 minutes.
*/
- statHistLogInit(&C->dns.svc_time, 300, 0.0, 60000.0 * 10.0);
+ C->dns.svc_time.logInit(300, 0.0, 60000.0 * 10.0);
/*
* Cache Digest Stuff
*/