]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added per thread usage info in cachemgr Async IO Function Counters.
authorserassio <>
Thu, 7 Apr 2005 02:36:10 +0000 (02:36 +0000)
committerserassio <>
Thu, 7 Apr 2005 02:36:10 +0000 (02:36 +0000)
src/DiskIO/DiskThreads/DiskThreads.h
src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc
src/DiskIO/DiskThreads/aiops.cc

index 3335a356e4c3a0442b0b7dd1270e3968538405ea..0f944ba074a8df5387e2baeccc504c31e0663317 100644 (file)
@@ -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);
index 007a53aeee66b7ee06dce8e25b4f404946b70027..be92d16bc9d60f6123b01fed4a95f47695e45db1 100644 (file)
@@ -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;
index c9f84bcef0938cad8ee9f76d84504836757d39b1..5eba144ef16834a677484ee469b8c6924d6a4d2a 100644 (file)
@@ -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 <slf@connect.com.au>
@@ -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;
+    }
+}