From c23d9a10f7d526007f694569ee01cda71427add7 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Fri, 9 Dec 2011 18:28:13 +0100 Subject: [PATCH] Reverted StatHistLog changes. Too ambitious for now. --- src/StatHist.cc | 5 ----- src/StatHist.h | 9 +-------- src/stat.cc | 16 ++++++++-------- src/structs.h | 16 ++++++++-------- 4 files changed, 17 insertions(+), 29 deletions(-) diff --git a/src/StatHist.cc b/src/StatHist.cc index 072f4db26a..85f28bd3dc 100644 --- a/src/StatHist.cc +++ b/src/StatHist.cc @@ -288,8 +288,3 @@ statHistIntDumper(StoreEntry * sentry, int idx, double val, double size, int cou if (count) storeAppendPrintf(sentry, "%9d\t%9d\n", (int) val, count); } - -StatHistLog::StatHistLog(int capacity_, double min_, double max_) -{ - init(capacity_, Math::Log, Math::Exp, min_, max_); -} diff --git a/src/StatHist.h b/src/StatHist.h index ee3258116a..e128b4a48e 100644 --- a/src/StatHist.h +++ b/src/StatHist.h @@ -56,6 +56,7 @@ public: val_in(NULL), val_out(NULL) {}; StatHist(const StatHist&); void dump(StoreEntry *sentry, StatHistBinDumper * bd) const; + void logInit(int capacity, double min, double max); void enumInit(int last_enum); void intInit(int n); void init(int capacity, hbase_f * val_in, hbase_f * val_out, double min, double max); @@ -63,14 +64,6 @@ private: int findBin(double v); }; -class StatHistLog: public StatHist -{ - public: - StatHistLog(int capacity_, double min_, double max_); -}; - - - /* StatHist */ void statHistCount(StatHist * H, double val); double statHistDeltaMedian(const StatHist & A, const StatHist & B); diff --git a/src/stat.cc b/src/stat.cc index 60dd5a1578..033782e017 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1486,20 +1486,20 @@ statCountersInitSpecial(StatCounters * C) /* * 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); + 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); /* * 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); + 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); /* * 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); + statHistLogInit(&C->dns.svc_time, 300, 0.0, 60000.0 * 10.0); /* * Cache Digest Stuff */ diff --git a/src/structs.h b/src/structs.h index 5dd8ae1749..d398e95485 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1118,11 +1118,11 @@ struct _StatCounters { kb_t kbytes_in; kb_t kbytes_out; kb_t hit_kbytes_out; - StatHistLog miss_svc_time(300, 0.0, 3600000.0 * 3.0); - StatHistLog nm_svc_time(300, 0.0, 3600000.0 * 3.0); - StatHistLog nh_svc_time(300, 0.0, 3600000.0 * 3.0); - StatHistLog hit_svc_time(300, 0.0, 3600000.0 * 3.0); - StatHistLog all_svc_time(300, 0.0, 3600000.0 * 3.0); + StatHist miss_svc_time; + StatHist nm_svc_time; + StatHist nh_svc_time; + StatHist hit_svc_time; + StatHist all_svc_time; } client_http; struct { @@ -1152,8 +1152,8 @@ struct _StatCounters { kb_t kbytes_recv; kb_t q_kbytes_recv; kb_t r_kbytes_recv; - StatHistLog query_svc_time(300, 0.0, 1000000.0 * 60.0); - StatHistLog reply_svc_time(300, 0.0, 1000000.0 * 60.0); + StatHist query_svc_time; + StatHist reply_svc_time; int query_timeouts; int times_used; } icp; @@ -1168,7 +1168,7 @@ struct _StatCounters { } unlink; struct { - StatHistLog svc_time(300, 0.0, 60000.0 * 10.0); + StatHist svc_time; } dns; struct { -- 2.47.2