#include "cache_cf.h"
#include "ConfigParser.h"
#include "Debug.h"
+#include "fatal.h"
#include "globals.h"
void
--- /dev/null
+#ifndef SQUID_IOSTATS_H_
+#define SQUID_IOSTATS_H_
+/*
+ * SQUID Web Proxy Cache http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ * Squid is the result of efforts by numerous individuals from
+ * the Internet community; see the CONTRIBUTORS file for full
+ * details. Many organizations have provided support for Squid's
+ * development; see the SPONSORS file for full details. Squid is
+ * Copyrighted (C) 2001 by the Regents of the University of
+ * California; see the COPYRIGHT file for full details. Squid
+ * incorporates software developed and/or copyrighted by other
+ * sources; see the CREDITS file for full details.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+class IoStats {
+public:
+ static const int histSize=16;
+
+ struct {
+ int reads;
+ int reads_deferred;
+ int read_hist[histSize];
+ int writes;
+ int write_hist[histSize];
+ }
+
+ Http, Ftp, Gopher;
+};
+
+#endif /* SQUID_IOSTATS_H_ */
SquidMath.h \
SquidMath.cc \
SquidNew.cc \
+ IoStats.h \
stat.h \
stat.cc \
StatCounters.h \
$(SNMP_SOURCE) \
SquidMath.h \
SquidMath.cc \
+ IoStats.h \
stat.h \
stat.cc \
StatCounters.h \
$(SNMP_SOURCE) \
SquidMath.cc \
SquidMath.h \
+ IoStats.h \
stat.h \
stat.cc \
StatCounters.h \
$(SNMP_SOURCE) \
SquidMath.h \
SquidMath.cc \
+ IoStats.h \
stat.h \
stat.cc \
StatCounters.h \
$(SNMP_SOURCE) \
SquidMath.h \
SquidMath.cc \
+ IoStats.h \
stat.h \
stat.cc \
StatCounters.h \
$(SNMP_SOURCE) \
SquidMath.h \
SquidMath.cc \
+ IoStats.h \
stat.h \
stat.cc \
StatCounters.h \
$(SNMP_SOURCE) \
SquidMath.h \
SquidMath.cc \
+ IoStats.h \
stat.h \
stat.cc \
StatCounters.h \
#ifndef SQUID_GLOBALS_H
#define SQUID_GLOBALS_H
+#include "acl/AclDenyInfoList.h"
+#include "CacheDigest.h"
+#include "defines.h"
+#include "hash.h"
+#include "IoStats.h"
+#include "rfc2181.h"
+
#if HAVE_STDIO_H
#include <stdio.h>
#endif
-#include "rfc2181.h"
-
-/* for ERROR_BUF_SZ, BUFSIZ */
-#include "defines.h"
-
-/* for iostats */
-#include "acl/AclDenyInfoList.h"
-#include "CacheDigest.h"
-#include "structs.h"
-
extern char *ConfigFile; /* NULL */
extern char *IcpOpcodeStr[];
extern char tmp_error_buf[ERROR_BUF_SZ];
extern int DnsSocketA; /* -1 */
extern int DnsSocketB; /* -1 */
extern int n_disk_objects; /* 0 */
-extern iostats IOStats;
+extern IoStats IOStats;
extern AclDenyInfoList *DenyInfoList; /* NULL */
#include "squid.h"
#include "base/TextException.h"
+#include "IoStats.h"
#include "ipc/Messages.h"
#include "ipc/TypedMsgHdr.h"
#include "mgr/IoAction.h"
Mgr::IoActionData::operator += (const IoActionData& stats)
{
http_reads += stats.http_reads;
- for (int i = 0; i < iostats::histSize; ++i)
+ for (int i = 0; i < IoStats::histSize; ++i)
http_read_hist[i] += stats.http_read_hist[i];
ftp_reads += stats.ftp_reads;
- for (int i = 0; i < iostats::histSize; ++i)
+ for (int i = 0; i < IoStats::histSize; ++i)
ftp_read_hist[i] += stats.ftp_read_hist[i];
gopher_reads += stats.gopher_reads;
- for (int i = 0; i < iostats::histSize; ++i)
+ for (int i = 0; i < IoStats::histSize; ++i)
gopher_read_hist[i] += stats.gopher_read_hist[i];
return *this;
#define SQUID_MGR_IO_ACTION_H
#include "mgr/Action.h"
-#include "structs.h" /* iostats::histSize */
+#include "IoStats.h"
namespace Mgr
{
double http_reads;
double ftp_reads;
double gopher_reads;
- double http_read_hist[iostats::histSize];
- double ftp_read_hist[iostats::histSize];
- double gopher_read_hist[iostats::histSize];
+ double http_read_hist[IoStats::histSize];
+ double ftp_read_hist[IoStats::histSize];
+ double gopher_read_hist[IoStats::histSize];
};
/// implement aggregated 'io' action
#include "format/Token.h"
#include "globals.h"
#include "HttpRequest.h"
+#include "IoStats.h"
#include "MemObject.h"
#include "mem_node.h"
#include "MemBuf.h"
stats.http_reads = IOStats.Http.reads;
- for (i = 0; i < iostats::histSize; ++i) {
+ for (i = 0; i < IoStats::histSize; ++i) {
stats.http_read_hist[i] = IOStats.Http.read_hist[i];
}
stats.ftp_reads = IOStats.Ftp.reads;
- for (i = 0; i < iostats::histSize; ++i) {
+ for (i = 0; i < IoStats::histSize; ++i) {
stats.ftp_read_hist[i] = IOStats.Ftp.read_hist[i];
}
stats.gopher_reads = IOStats.Gopher.reads;
- for (i = 0; i < iostats::histSize; ++i) {
+ for (i = 0; i < IoStats::histSize; ++i) {
stats.gopher_read_hist[i] = IOStats.Gopher.read_hist[i];
}
}
storeAppendPrintf(sentry, "number of reads: %.0f\n", stats.http_reads);
storeAppendPrintf(sentry, "Read Histogram:\n");
- for (i = 0; i < iostats::histSize; ++i) {
+ for (i = 0; i < IoStats::histSize; ++i) {
storeAppendPrintf(sentry, "%5d-%5d: %9.0f %2.0f%%\n",
i ? (1 << (i - 1)) + 1 : 1,
1 << i,
storeAppendPrintf(sentry, "number of reads: %.0f\n", stats.ftp_reads);
storeAppendPrintf(sentry, "Read Histogram:\n");
- for (i = 0; i < iostats::histSize; ++i) {
+ for (i = 0; i < IoStats::histSize; ++i) {
storeAppendPrintf(sentry, "%5d-%5d: %9.0f %2.0f%%\n",
i ? (1 << (i - 1)) + 1 : 1,
1 << i,
storeAppendPrintf(sentry, "number of reads: %.0f\n", stats.gopher_reads);
storeAppendPrintf(sentry, "Read Histogram:\n");
- for (i = 0; i < iostats::histSize; ++i) {
+ for (i = 0; i < IoStats::histSize; ++i) {
storeAppendPrintf(sentry, "%5d-%5d: %9.0f %2.0f%%\n",
i ? (1 << (i - 1)) + 1 : 1,
1 << i,
int n_peers;
};
-class iostats {
-public:
- static const int histSize=16;
-
-// enum { histSize = 16 };
-
- struct {
- int reads;
- int reads_deferred;
- int read_hist[histSize];
- int writes;
- int write_hist[histSize];
- }
-
- Http, Ftp, Gopher;
-};
-
#if USE_SSL
struct _sslproxy_cert_sign {
int alg;
*/
#include "squid.h"
+#include "acl/Acl.h"
#include "ConfigParser.h"
#include "wordlist.h"
#include "YesNoNone.h"
MEMPROXY_CLASS_INLINE(wordlist);
+class MemBuf;
+
extern const char *wordlistAdd(wordlist **, const char *);
extern void wordlistCat(const wordlist *, MemBuf * mb);
extern void wordlistAddWl(wordlist **, wordlist *);