]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/ServiceTimesAction.h
SMP Cache Manager, Phase2 implementation.
[thirdparty/squid.git] / src / mgr / ServiceTimesAction.h
1 /*
2 * $Id$
3 *
4 * DEBUG: section 16 Cache Manager API
5 *
6 */
7
8 #ifndef SQUID_MGR_SERVICE_TIMES_ACTION_H
9 #define SQUID_MGR_SERVICE_TIMES_ACTION_H
10
11 #include "mgr/Action.h"
12
13
14 namespace Mgr
15 {
16
17 /// store service times for 5 and 60 min
18 class ServiceTimesActionData
19 {
20 public:
21 enum { seriesSize = 19 };
22
23 public:
24 ServiceTimesActionData();
25 ServiceTimesActionData& operator += (const ServiceTimesActionData& stats);
26
27 public:
28 double http_requests5[seriesSize];
29 double http_requests60[seriesSize];
30 double cache_misses5[seriesSize];
31 double cache_misses60[seriesSize];
32 double cache_hits5[seriesSize];
33 double cache_hits60[seriesSize];
34 double near_hits5[seriesSize];
35 double near_hits60[seriesSize];
36 double not_modified_replies5[seriesSize];
37 double not_modified_replies60[seriesSize];
38 double dns_lookups5[seriesSize];
39 double dns_lookups60[seriesSize];
40 double icp_queries5[seriesSize];
41 double icp_queries60[seriesSize];
42 unsigned int count;
43 };
44
45 /// implement aggregated 'service_times' action
46 class ServiceTimesAction: public Action
47 {
48 protected:
49 ServiceTimesAction(const CommandPointer &cmd);
50
51 public:
52 static Pointer Create(const CommandPointer &cmd);
53 /* Action API */
54 virtual void add(const Action& action);
55 virtual void pack(Ipc::TypedMsgHdr& msg) const;
56 virtual void unpack(const Ipc::TypedMsgHdr& msg);
57
58 protected:
59 /* Action API */
60 virtual void collect();
61 virtual void dump(StoreEntry* entry);
62
63 private:
64 ServiceTimesActionData data;
65 };
66
67 } // namespace Mgr
68
69 #endif /* SQUID_MGR_SERVICE_TIMES_ACTION_H */