From: serassio <> Date: Thu, 7 Apr 2005 02:36:10 +0000 (+0000) Subject: Added per thread usage info in cachemgr Async IO Function Counters. X-Git-Tag: SQUID_3_0_PRE4~811 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b04654945673550e4d527cd79bcf7bab3409b7e4;p=thirdparty%2Fsquid.git Added per thread usage info in cachemgr Async IO Function Counters. --- diff --git a/src/DiskIO/DiskThreads/DiskThreads.h b/src/DiskIO/DiskThreads/DiskThreads.h index 3335a356e4..0f944ba074 100644 --- a/src/DiskIO/DiskThreads/DiskThreads.h +++ b/src/DiskIO/DiskThreads/DiskThreads.h @@ -82,6 +82,7 @@ int squidaio_sync(void); int squidaio_get_queue_len(void); void *squidaio_xmalloc(int size); void squidaio_xfree(void *p, int size); +void squidaio_stats(StoreEntry *); void aioInit(void); void aioDone(void); diff --git a/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc b/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc index 007a53aeee..be92d16bc9 100644 --- a/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc +++ b/src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc @@ -1,6 +1,6 @@ /* - * $Id: DiskThreadsIOStrategy.cc,v 1.2 2005/04/01 21:11:28 serassio Exp $ + * $Id: DiskThreadsIOStrategy.cc,v 1.3 2005/04/06 20:36:10 serassio Exp $ * * DEBUG: section 79 Squid-side Disk I/O functions. * AUTHOR: Robert Collins @@ -195,6 +195,7 @@ DiskThreadsIOStrategy::aioStats(StoreEntry * sentry) storeAppendPrintf(sentry, "unlink\t%d\t%d\n", squidaio_counts.unlink_start, squidaio_counts.unlink_finish); storeAppendPrintf(sentry, "check_callback\t%d\t-\n", squidaio_counts.check_callback); storeAppendPrintf(sentry, "queue\t%d\t-\n", squidaio_get_queue_len()); + squidaio_stats(sentry); } DiskThreadsIOStrategy DiskThreadsIOStrategy::Instance; diff --git a/src/DiskIO/DiskThreads/aiops.cc b/src/DiskIO/DiskThreads/aiops.cc index c9f84bcef0..5eba144ef1 100644 --- a/src/DiskIO/DiskThreads/aiops.cc +++ b/src/DiskIO/DiskThreads/aiops.cc @@ -1,5 +1,5 @@ /* - * $Id: aiops.cc,v 1.3 2005/04/06 19:01:02 serassio Exp $ + * $Id: aiops.cc,v 1.4 2005/04/06 20:36:10 serassio Exp $ * * DEBUG: section 43 AIOPS * AUTHOR: Stewart Forster @@ -1074,3 +1074,24 @@ squidaio_debug(squidaio_request_t * request) break; } } + +void +squidaio_stats(StoreEntry * sentry) +{ + squidaio_thread_t *threadp; + int i; + + if (!squidaio_initialised) + return; + + storeAppendPrintf(sentry, "\n\nThreads Status:\n"); + + storeAppendPrintf(sentry, "#\tID\t# Requests\n"); + + threadp = threads; + + for (i = 0; i < NUMTHREADS; i++) { + storeAppendPrintf(sentry, "%i\t0x%lx\t%ld\n", i + 1, threadp->thread, threadp->requests); + threadp = threadp->next; + } +}