/*
- * $Id: comm_select.cc,v 1.6 1998/09/03 03:37:33 wessels Exp $
+ * $Id: comm_select.cc,v 1.7 1998/09/03 03:48:39 wessels Exp $
*
* DEBUG: section 5 Socket Functions
*
return COMM_ERROR;
/* NOTREACHED */
}
- debug(5, num ? 5 : 8) ("comm_poll: %d sockets ready\n", num);
+ debug(5, num ? 5 : 8) ("comm_poll: %d FDs ready\n", num);
+ statHistCount(&Counter.select_fds_hist, num);
/* Check timeout handlers ONCE each second. */
if (squid_curtime > last_timeout) {
last_timeout = squid_curtime;
}
if (num < 0)
continue;
- debug(5, num ? 5 : 8) ("comm_select: %d sockets ready at %d\n",
+ debug(5, num ? 5 : 8) ("comm_select: %d FDs ready at %d\n",
num, (int) squid_curtime);
+ statHistCount(&Counter.select_fds_hist, num);
/* Check lifetime and timeout handlers ONCE each second.
* Replaces brain-dead check every time through the loop! */
if (squid_curtime > last_timeout) {
/*
- * $Id: protos.h,v 1.259 1998/09/03 03:37:34 wessels Exp $
+ * $Id: protos.h,v 1.260 1998/09/03 03:48:38 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
extern void statHistDump(const StatHist * H, StoreEntry * sentry, StatHistBinDumper bd);
extern void statHistLogInit(StatHist * H, int capacity, double min, double max);
extern void statHistEnumInit(StatHist * H, int last_enum);
+extern void statHistIntInit(StatHist * H, int n);
extern StatHistBinDumper statHistEnumDumper;
extern StatHistBinDumper statHistIntDumper;
/*
- * $Id: stat.cc,v 1.282 1998/09/03 03:37:35 wessels Exp $
+ * $Id: stat.cc,v 1.283 1998/09/03 03:48:36 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
f->select_fds > l->select_fds ?
(f->select_time - l->select_time) / (f->select_fds - l->select_fds)
: 0.0);
+ x = statHistDeltaMedian(&l->select_fds_hist, &f->select_fds_hist);
+ storeAppendPrintf(sentry, "median_select_fds = %f\n", x);
+
storeAppendPrintf(sentry, "cpu_time = %f seconds\n", ct);
storeAppendPrintf(sentry, "wall_time = %f seconds\n", dt);
storeAppendPrintf(sentry, "cpu_usage = %f%%\n", dpercent(ct, dt));
statHistEnumInit(&C->cd.on_xition_count, CacheDigestHashFuncCount);
statHistEnumInit(&C->comm_icp_incoming, INCOMING_ICP_MAX);
statHistEnumInit(&C->comm_http_incoming, INCOMING_HTTP_MAX);
+ statHistIntInit(&C->select_fds_hist, SQUID_MAXFD);
}
/* add special cases here as they arrive */
statHistClean(&C->cd.on_xition_count);
statHistClean(&C->comm_icp_incoming);
statHistClean(&C->comm_http_incoming);
+ statHistClean(&C->select_fds_hist);
}
/* add special cases here as they arrive */
statHistCopy(&dest->cd.on_xition_count, &orig->cd.on_xition_count);
statHistCopy(&dest->comm_icp_incoming, &orig->comm_icp_incoming);
statHistCopy(&dest->comm_http_incoming, &orig->comm_http_incoming);
+ statHistCopy(&dest->select_fds_hist, &orig->select_fds_hist);
}
static void
/*
- * $Id: structs.h,v 1.215 1998/09/03 03:37:36 wessels Exp $
+ * $Id: structs.h,v 1.216 1998/09/03 03:48:37 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
struct timeval timestamp;
StatHist comm_icp_incoming;
StatHist comm_http_incoming;
+ StatHist select_fds_hist;
};
/* per header statistics */