1999-12-08
1999-12-08 12:24:14 by Per Hedbor <ph@opera.com>
-
725645bc76b8eb5e3f19b94450197b153e2e69e4
(15 lines)
(+12/-3)
[
Show
| Annotate
]
Branch: 5.2
Fixes for the fhttp protocol module
Rev: server/base_server/roxen.pike:1.367
Rev: server/base_server/rxml.pike:1.44
Rev: server/protocols/fhttp.pike:2.2
1:
/*
- * $Id: roxen.pike,v 1.366 1999/12/08 08:08:43 per Exp $
+ * $Id: roxen.pike,v 1.367 1999/12/08 12:24:08 per Exp $
*
* The Roxen Challenger main program.
*
7:
*/
// ABS and suicide systems contributed freely by Francesco Chemolli
- constant cvs_version="$Id: roxen.pike,v 1.366 1999/12/08 08:08:43 per Exp $";
+ constant cvs_version="$Id: roxen.pike,v 1.367 1999/12/08 12:24:08 per Exp $";
object backend_thread;
ArgCache argcache;
1201: Inside #if constant(HTTPLoop.prog)
void low_adjust_stats(mapping m)
{
- // werror("%O\n", m);
+
+ #define PCT(X) ((int)(((X)/(float)(m->total+0.1))*100))
+ werror("\nCache statistics\n");
+ m->total = m->hits + m->misses + m->stale;
+ werror(" %d elements in cache, size is %1.1fKb max is %1.1fMb\n"
+ " %d cache lookups, %d%% hits, %d%% misses and %d%% stale.\n",
+ m->entries, m->size/1024.0, m->max_size/(1024*1024.0),
+ m->total, PCT(m->hits), PCT(m->misses), PCT(m->stale));
+
array q = values( urls )->conf;
if( sizeof( q ) ) /* This is not exactly correct if sizeof(q)>1 */
{