*/
#include "squid.h"
+#include "StatHist.h"
#include "Store.h"
#if USE_CACHE_DIGESTS
#include "squid.h"
#include "base/StringArea.h"
-#include "Store.h"
#include "HttpHeader.h"
#include "HttpHdrCc.h"
+#include "StatHist.h"
+#include "Store.h"
#if HAVE_MAP
#include <map>
#include "squid.h"
#include "HttpHdrSc.h"
+#include "StatHist.h"
extern http_hdr_sc_type &operator++ (http_hdr_sc_type &aHeader);
/* copies non-extant fields from new_sc to this sc */
#include "MemBuf.h"
#include "mgr/Registration.h"
#include "rfc1123.h"
+#include "StatHist.h"
#include "Store.h"
#include "TimeOrTag.h"
SquidMath.cc \
SquidNew.cc \
stat.cc \
+ StatHist.h \
StatHist.cc \
String.cc \
stmem.cc \
tests/stub_cache_manager.cc \
tests/stub_debug.cc \
tests/stub_HelperChildConfig.cc \
+ StatHist.h \
tests/stub_StatHist.cc \
tests/stub_store.cc \
tests/stub_store_stats.cc \
Packer.cc \
Parsing.cc \
SquidMath.cc \
+ StatHist.h \
StatHist.cc \
stmem.cc \
String.cc \
SquidMath.h \
SquidMath.cc \
stat.cc \
+ StatHist.h \
StatHist.cc \
stmem.cc \
store.cc \
Parsing.cc \
refresh.cc \
RemovalPolicy.cc \
+ StatHist.h \
StatHist.cc \
stmem.cc \
StoreFileSystem.cc \
SquidMath.cc \
SquidMath.h \
stat.cc \
+ StatHist.h \
StatHist.cc \
stmem.cc \
store.cc \
SquidMath.h \
SquidMath.cc \
stat.cc \
+ StatHist.h \
StatHist.cc \
stmem.cc \
store.cc \
SquidMath.h \
SquidMath.cc \
stat.cc \
+ StatHist.h \
StatHist.cc \
stmem.cc \
store.cc \
SquidMath.h \
SquidMath.cc \
stat.cc \
+ StatHist.h \
StatHist.cc \
stmem.cc \
store.cc \
Parsing.cc \
RemovalPolicy.cc \
refresh.cc \
+ StatHist.h \
StatHist.cc \
stmem.cc \
store.cc \
HttpHdrSc.cc \
HttpHdrScTarget.cc \
url.cc \
+ StatHist.h \
StatHist.cc \
HttpHdrRange.cc \
ETag.cc \
Packer.cc \
Parsing.cc \
RemovalPolicy.cc \
+ StatHist.h \
StatHist.cc \
stmem.cc \
store.cc \
HttpHdrSc.cc \
HttpHdrScTarget.cc \
url.cc \
+ StatHist.h \
StatHist.cc \
HttpHdrRange.cc \
ETag.cc \
HttpHdrSc.cc \
HttpHdrScTarget.cc \
url.cc \
+ StatHist.h \
StatHist.cc \
HttpHdrRange.cc \
ETag.cc \
SquidMath.h \
SquidMath.cc \
stat.cc \
+ StatHist.h \
StatHist.cc \
stmem.cc \
store.cc \
*/
#include "squid.h"
+#include "StatHist.h"
#include "Store.h"
/* Local functions */
--- /dev/null
+/*
+ * 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.
+ *
+ * AUTHOR: Francesco Chemolli
+ */
+
+#ifndef STATHIST_H_
+#define STATHIST_H_
+
+/*
+ * "very generic" histogram;
+ * see important comments on hbase_f restrictions in StatHist.c
+ */
+
+class StatHist {
+public:
+ int *bins;
+ int capacity;
+ double min;
+ double max;
+ double scale;
+ hbase_f *val_in; /* e.g., log() for log-based histogram */
+ hbase_f *val_out; /* e.g., exp() for log based histogram */
+};
+
+/* StatHist */
+SQUIDCEXTERN void statHistClean(StatHist * H);
+SQUIDCEXTERN void statHistCount(StatHist * H, double val);
+SQUIDCEXTERN void statHistCopy(StatHist * Dest, const StatHist * Orig);
+SQUIDCEXTERN void statHistSafeCopy(StatHist * Dest, const StatHist * Orig);
+SQUIDCEXTERN double statHistDeltaMedian(const StatHist * A, const StatHist * B);
+SQUIDCEXTERN double statHistDeltaPctile(const StatHist * A, const StatHist * B, double pctile);
+SQUIDCEXTERN void statHistDump(const StatHist * H, StoreEntry * sentry, StatHistBinDumper * bd);
+SQUIDCEXTERN void statHistLogInit(StatHist * H, int capacity, double min, double max);
+SQUIDCEXTERN void statHistEnumInit(StatHist * H, int last_enum);
+SQUIDCEXTERN void statHistIntInit(StatHist * H, int n);
+SQUIDCEXTERN StatHistBinDumper statHistEnumDumper;
+SQUIDCEXTERN StatHistBinDumper statHistIntDumper;
+
+
+
+
+#endif /* STATHIST_H_ */
#include "MemObject.h"
#include "ProtoPort.h"
#include "rfc1738.h"
+#include "StatHist.h"
#include "SquidTime.h"
#if USE_SSL
#include "ssl/context_storage.h"
#include "fde.h"
#include "mgr/Registration.h"
#include "SquidTime.h"
+#include "StatHist.h"
#include "Store.h"
#if HAVE_SYS_DEVPOLL_H
#include "fde.h"
#include "mgr/Registration.h"
#include "SquidTime.h"
+#include "StatHist.h"
#include "Store.h"
#define DEBUG_EPOLL 0
#include "ICP.h"
#include "mgr/Registration.h"
#include "SquidTime.h"
+#include "StatHist.h"
#include "Store.h"
#if HAVE_POLL_H
#include "mgr/Registration.h"
#include "SquidTime.h"
#include "Store.h"
+#include "StatHist.h"
#include "fde.h"
static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */
#include "fde.h"
#include "mgr/Registration.h"
#include "SquidTime.h"
+#include "StatHist.h"
#include "Store.h"
static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */
#include "event.h"
#include "mgr/Registration.h"
#include "SquidTime.h"
+#include "StatHist.h"
#include "Store.h"
#include "wordlist.h"
#include "acl/Acl.h"
#include "AccessLogEntry.h"
#include "wordlist.h"
+#include "StatHist.h"
#include "SquidTime.h"
#include "SwapDir.h"
#include "icmp/net_db.h"
#include "ipcache.h"
#include "mgr/Registration.h"
#include "SquidTime.h"
+#include "StatHist.h"
#include "Store.h"
#include "wordlist.h"
#include "HttpStatusCode.h"
SQUIDCEXTERN const char *httpStatusString(http_status status);
+class StatHist;
+
/* Http Cache Control Header Field */
SQUIDCEXTERN void httpHdrCcInitModule(void);
SQUIDCEXTERN void httpHdrCcCleanModule(void);
SQUIDCEXTERN double statRequestHitDiskRatio(int minutes);
SQUIDCEXTERN double statByteHitRatio(int minutes);
-/* StatHist */
-SQUIDCEXTERN void statHistClean(StatHist * H);
-SQUIDCEXTERN void statHistCount(StatHist * H, double val);
-SQUIDCEXTERN void statHistCopy(StatHist * Dest, const StatHist * Orig);
-SQUIDCEXTERN void statHistSafeCopy(StatHist * Dest, const StatHist * Orig);
-SQUIDCEXTERN double statHistDeltaMedian(const StatHist * A, const StatHist * B);
-SQUIDCEXTERN double statHistDeltaPctile(const StatHist * A, const StatHist * B, double pctile);
-SQUIDCEXTERN void statHistDump(const StatHist * H, StoreEntry * sentry, StatHistBinDumper * bd);
-SQUIDCEXTERN void statHistLogInit(StatHist * H, int capacity, double min, double max);
-SQUIDCEXTERN void statHistEnumInit(StatHist * H, int last_enum);
-SQUIDCEXTERN void statHistIntInit(StatHist * H, int n);
-SQUIDCEXTERN StatHistBinDumper statHistEnumDumper;
-SQUIDCEXTERN StatHistBinDumper statHistIntDumper;
-
-
/* mem */
SQUIDCEXTERN void memClean(void);
SQUIDCEXTERN void memInitModule(void);
#include "cache_snmp.h"
#include "Store.h"
#include "mem_node.h"
+#include "StatHist.h"
#include "SquidMath.h"
#include "SquidTime.h"
#include "MemBuf.h"
#include "SquidMath.h"
#include "SquidTime.h"
+#include "StatHist.h"
#include "mgr/CountersAction.h"
#include "mgr/FunAction.h"
#include "mgr/InfoAction.h"
int max_stale;
};
-/*
- * "very generic" histogram;
- * see important comments on hbase_f restrictions in StatHist.c
- */
-
-struct _StatHist {
- int *bins;
- int capacity;
- double min;
- double max;
- double scale;
- hbase_f *val_in; /* e.g., log() for log-based histogram */
- hbase_f *val_out; /* e.g., exp() for log based histogram */
-};
-
/*
* if you add a field to StatCounters,
* you MUST sync statCountersInitSpecial, statCountersClean, and statCountersCopy
*/
+#include "StatHist.h"
+
struct _StatCounters {
struct {
#include "squid.h"
// for StatHist definitions
-#include "protos.h"
+#include "StatHist.h"
void
statHistDump(const StatHist * H, StoreEntry * sentry, StatHistBinDumper * bd)
typedef struct _storeSwapLogData storeSwapLogData;
-typedef struct _StatHist StatHist;
-
typedef struct _cd_guess_stats cd_guess_stats;
typedef struct _CacheDigest CacheDigest;