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);
/*
- * $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
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;
/*
- * $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>
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;
+ }
+}