]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
add near-hit service time histogram
authorwessels <>
Sun, 16 Aug 1998 12:35:15 +0000 (12:35 +0000)
committerwessels <>
Sun, 16 Aug 1998 12:35:15 +0000 (12:35 +0000)
src/client_side.cc
src/enums.h
src/stat.cc
src/structs.h

index 0fab6a9697c95c88bc51fc1570862d76a9f6262f..86aafde9292fd4ee7c840372c0535cfa3c76150b 100644 (file)
@@ -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;
index b034623519821ff7303e64d1bf2e346456e8c4e3..fdad9fe79113fe144c6aad7b27f3cdd48eeb7591 100644 (file)
@@ -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
 };
 
index 4dad89f302a7a11036ce5ff931a66ec73aa1e4bc..b0db6aa7270ec4e6f302846648711dfe06f32551 100644 (file)
@@ -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;
index f246283e3f5656b311f055123faab45b9656e970..0562175b77f9808ac2bd63c84c079ef4167644c7 100644 (file)
@@ -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;