From: wessels <> Date: Sun, 16 Aug 1998 12:35:15 +0000 (+0000) Subject: add near-hit service time histogram X-Git-Tag: SQUID_3_0_PRE1~2893 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7c9c84ad88932d214e2423503e3c471d30c67dbf;p=thirdparty%2Fsquid.git add near-hit service time histogram --- diff --git a/src/client_side.cc b/src/client_side.cc index 0fab6a9697..86aafde929 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.377 1998/08/14 19:25:15 wessels Exp $ + * $Id: client_side.cc,v 1.378 1998/08/16 06:35:15 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -522,6 +522,9 @@ clientUpdateCounters(clientHttpRequest * http) * (we *tried* to validate it, but failed). */ switch (http->log_type) { + case LOG_TCP_REFRESH_HIT: + statHistCount(&Counter.client_http.nh_svc_time, svc_time); + break; case LOG_TCP_IMS_HIT: statHistCount(&Counter.client_http.nm_svc_time, svc_time); break; diff --git a/src/enums.h b/src/enums.h index b034623519..fdad9fe791 100644 --- a/src/enums.h +++ b/src/enums.h @@ -1,6 +1,6 @@ /* - * $Id: enums.h,v 1.114 1998/08/14 19:25:17 wessels Exp $ + * $Id: enums.h,v 1.115 1998/08/16 06:35:17 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -644,6 +644,7 @@ enum { MEDIAN_HIT, MEDIAN_MISS, MEDIAN_NM, + MEDIAN_NH, MEDIAN_ICP_REPLY }; diff --git a/src/stat.cc b/src/stat.cc index 4dad89f302..b0db6aa727 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.277 1998/08/11 21:53:05 wessels Exp $ + * $Id: stat.cc,v 1.278 1998/08/16 06:35:17 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -487,6 +487,9 @@ info_get(StoreEntry * sentry) storeAppendPrintf(sentry, "\tCache Hits: %8.5f %8.5f\n", statMedianSvc(5, MEDIAN_HIT) / 1000.0, statMedianSvc(60, MEDIAN_HIT) / 1000.0); + storeAppendPrintf(sentry, "\tNear Hits: %8.5f %8.5f\n", + statMedianSvc(5, MEDIAN_NH) / 1000.0, + statMedianSvc(60, MEDIAN_NH) / 1000.0); storeAppendPrintf(sentry, "\tNot-Modified Replies: %8.5f %8.5f\n", statMedianSvc(5, MEDIAN_NM) / 1000.0, statMedianSvc(60, MEDIAN_NM) / 1000.0); @@ -653,6 +656,10 @@ statAvgDump(StoreEntry * sentry, int minutes, int hours) &f->client_http.nm_svc_time); storeAppendPrintf(sentry, "client_http.nm_median_svc_time = %f seconds\n", x / 1000.0); + x = statHistDeltaMedian(&l->client_http.nh_svc_time, + &f->client_http.nh_svc_time); + storeAppendPrintf(sentry, "client_http.nh_median_svc_time = %f seconds\n", + x / 1000.0); x = statHistDeltaMedian(&l->client_http.hit_svc_time, &f->client_http.hit_svc_time); storeAppendPrintf(sentry, "client_http.hit_median_svc_time = %f seconds\n", @@ -851,6 +858,7 @@ statCountersInitSpecial(StatCounters * C) 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. @@ -877,6 +885,7 @@ statCountersClean(StatCounters * C) statHistClean(&C->client_http.all_svc_time); statHistClean(&C->client_http.miss_svc_time); statHistClean(&C->client_http.nm_svc_time); + statHistClean(&C->client_http.nh_svc_time); statHistClean(&C->client_http.hit_svc_time); statHistClean(&C->icp.query_svc_time); statHistClean(&C->icp.reply_svc_time); @@ -900,6 +909,7 @@ statCountersCopy(StatCounters * dest, const StatCounters * orig) statHistCopy(&dest->client_http.all_svc_time, &orig->client_http.all_svc_time); statHistCopy(&dest->client_http.miss_svc_time, &orig->client_http.miss_svc_time); statHistCopy(&dest->client_http.nm_svc_time, &orig->client_http.nm_svc_time); + statHistCopy(&dest->client_http.nh_svc_time, &orig->client_http.nh_svc_time); statHistCopy(&dest->client_http.hit_svc_time, &orig->client_http.hit_svc_time); statHistCopy(&dest->icp.query_svc_time, &orig->icp.query_svc_time); statHistCopy(&dest->icp.reply_svc_time, &orig->icp.reply_svc_time); @@ -919,6 +929,8 @@ statCountersHistograms(StoreEntry * sentry) statHistDump(&f->client_http.miss_svc_time, sentry, NULL); storeAppendPrintf(sentry, "client_http.nm_svc_time histogram:\n"); statHistDump(&f->client_http.nm_svc_time, sentry, NULL); + storeAppendPrintf(sentry, "client_http.nh_svc_time histogram:\n"); + statHistDump(&f->client_http.nh_svc_time, sentry, NULL); storeAppendPrintf(sentry, "client_http.hit_svc_time histogram:\n"); statHistDump(&f->client_http.hit_svc_time, sentry, NULL); storeAppendPrintf(sentry, "icp.query_svc_time histogram:\n"); @@ -1161,6 +1173,9 @@ statMedianSvc(int interval, int which) case MEDIAN_NM: x = statHistDeltaMedian(&l->client_http.nm_svc_time, &f->client_http.nm_svc_time); break; + case MEDIAN_NH: + x = statHistDeltaMedian(&l->client_http.nh_svc_time, &f->client_http.nh_svc_time); + break; case MEDIAN_ICP_QUERY: x = statHistDeltaMedian(&l->icp.query_svc_time, &f->icp.query_svc_time); break; diff --git a/src/structs.h b/src/structs.h index f246283e3f..0562175b77 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.197 1998/08/14 16:42:04 wessels Exp $ + * $Id: structs.h,v 1.198 1998/08/16 06:35:18 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -1294,6 +1294,7 @@ struct _StatCounters { kb_t hit_kbytes_out; StatHist miss_svc_time; StatHist nm_svc_time; + StatHist nh_svc_time; StatHist hit_svc_time; StatHist all_svc_time; } client_http;