From: Francesco Chemolli Date: Mon, 20 Aug 2012 15:08:33 +0000 (+0200) Subject: moved stat.cc prototypes to stat.h X-Git-Tag: sourceformat-review-1~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6ea5959eacfb907d69c31382d86e75007657d680;p=thirdparty%2Fsquid.git moved stat.cc prototypes to stat.h --- diff --git a/src/Makefile.am b/src/Makefile.am index 5917c5f6ea..5ed8d4c94d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -439,6 +439,7 @@ squid_SOURCES = \ SquidMath.h \ SquidMath.cc \ SquidNew.cc \ + stat.h \ stat.cc \ StatCounters.h \ StatCounters.cc \ @@ -1405,6 +1406,7 @@ tests_testCacheManager_SOURCES = \ $(SNMP_SOURCE) \ SquidMath.h \ SquidMath.cc \ + stat.h \ stat.cc \ StatCounters.h \ StatCounters.cc \ @@ -1757,6 +1759,7 @@ tests_testEvent_SOURCES = \ $(SNMP_SOURCE) \ SquidMath.cc \ SquidMath.h \ + stat.h \ stat.cc \ StatCounters.h \ StatCounters.cc \ @@ -1963,6 +1966,7 @@ tests_testEventLoop_SOURCES = \ $(SNMP_SOURCE) \ SquidMath.h \ SquidMath.cc \ + stat.h \ stat.cc \ StatCounters.h \ StatCounters.cc \ @@ -2165,6 +2169,7 @@ tests_test_http_range_SOURCES = \ $(SNMP_SOURCE) \ SquidMath.h \ SquidMath.cc \ + stat.h \ stat.cc \ StatCounters.h \ StatCounters.cc \ @@ -2408,6 +2413,7 @@ tests_testHttpRequest_SOURCES = \ $(SNMP_SOURCE) \ SquidMath.h \ SquidMath.cc \ + stat.h \ stat.cc \ StatCounters.h \ StatCounters.cc \ @@ -3363,6 +3369,7 @@ tests_testURL_SOURCES = \ $(SNMP_SOURCE) \ SquidMath.h \ SquidMath.cc \ + stat.h \ stat.cc \ StatCounters.h \ StatCounters.cc \ diff --git a/src/main.cc b/src/main.cc index ebb80621c2..ea33381da8 100644 --- a/src/main.cc +++ b/src/main.cc @@ -77,6 +77,7 @@ #include "tools.h" #include "SquidDns.h" #include "SquidTime.h" +#include "stat.h" #include "StatCounters.h" #include "StoreFileSystem.h" #include "Store.h" diff --git a/src/neighbors.cc b/src/neighbors.cc index 0522537c4b..10a2dc7224 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -53,6 +53,7 @@ #include "protos.h" #include "SquidMath.h" #include "SquidTime.h" +#include "stat.h" #include "Store.h" #include "URL.h" diff --git a/src/protos.h b/src/protos.h index 08f4682ada..acc54a5684 100644 --- a/src/protos.h +++ b/src/protos.h @@ -241,17 +241,6 @@ extern void reconfigure(int); extern void start_announce(void *unused); extern void waisStart(FwdState *); -SQUIDCEXTERN void statInit(void); -SQUIDCEXTERN void statFreeMemory(void); -SQUIDCEXTERN double median_svc_get(int, int); -SQUIDCEXTERN void pconnHistCount(int, int); -SQUIDCEXTERN int stat5minClientRequests(void); -SQUIDCEXTERN double stat5minCPUUsage(void); -SQUIDCEXTERN double statRequestHitRatio(int minutes); -SQUIDCEXTERN double statRequestHitMemoryRatio(int minutes); -SQUIDCEXTERN double statRequestHitDiskRatio(int minutes); -SQUIDCEXTERN double statByteHitRatio(int minutes); - /* mem */ SQUIDCEXTERN void memClean(void); SQUIDCEXTERN void memInitModule(void); diff --git a/src/snmp_agent.cc b/src/snmp_agent.cc index eeff365aff..dcf42b3b5f 100644 --- a/src/snmp_agent.cc +++ b/src/snmp_agent.cc @@ -42,6 +42,7 @@ #include "StatHist.h" #include "SquidMath.h" #include "SquidTime.h" +#include "stat.h" #include "Store.h" /************************************************************************ diff --git a/src/stat.cc b/src/stat.cc index 1ce9875b90..2dd0fe8a19 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -59,6 +59,7 @@ #include "SquidMath.h" #include "SquidTime.h" #include "StatCounters.h" +#include "stat.h" #include "StoreClient.h" #include "Store.h" #if USE_AUTH diff --git a/src/stat.h b/src/stat.h new file mode 100644 index 0000000000..2db0594c6d --- /dev/null +++ b/src/stat.h @@ -0,0 +1,47 @@ +/* + * DEBUG: section + * AUTHOR: + * + * 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. + * + */ + +#ifndef SQUID_STAT_H_ +#define SQUID_STAT_H_ + +extern void statInit(void); +extern void statFreeMemory(void); +extern double median_svc_get(int, int); +extern void pconnHistCount(int, int); +extern int stat5minClientRequests(void); +extern double stat5minCPUUsage(void); +extern double statRequestHitRatio(int minutes); +extern double statRequestHitMemoryRatio(int minutes); +extern double statRequestHitDiskRatio(int minutes); +extern double statByteHitRatio(int minutes); + +#endif /* SQUID_STAT_H_ */ diff --git a/src/tests/testEvent.cc b/src/tests/testEvent.cc index ad0fdb9fb6..2ab9f2fb4b 100644 --- a/src/tests/testEvent.cc +++ b/src/tests/testEvent.cc @@ -8,9 +8,9 @@ #include "event.h" #include "Mem.h" #include "protos.h" +#include "stat.h" #include "testEvent.h" - CPPUNIT_TEST_SUITE_REGISTRATION( testEvent ); /* init legacy static-initialized modules */ diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc index bd4fb74ef1..693988f7e8 100644 --- a/src/tests/testEventLoop.cc +++ b/src/tests/testEventLoop.cc @@ -7,6 +7,7 @@ #include "EventLoop.h" #include "Mem.h" #include "protos.h" +#include "stat.h" CPPUNIT_TEST_SUITE_REGISTRATION( testEventLoop );