]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/ServiceTimesAction.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / mgr / ServiceTimesAction.h
CommitLineData
8822ebee 1/*
4ac4a490 2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
8822ebee 3 *
bbc27441
AJ
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
8822ebee
AR
7 */
8
bbc27441
AJ
9/* DEBUG: section 16 Cache Manager API */
10
8822ebee
AR
11#ifndef SQUID_MGR_SERVICE_TIMES_ACTION_H
12#define SQUID_MGR_SERVICE_TIMES_ACTION_H
13
14#include "mgr/Action.h"
15
8822ebee
AR
16namespace Mgr
17{
18
19/// store service times for 5 and 60 min
20class ServiceTimesActionData
21{
22public:
23 enum { seriesSize = 19 };
24
25public:
26 ServiceTimesActionData();
27 ServiceTimesActionData& operator += (const ServiceTimesActionData& stats);
28
29public:
30 double http_requests5[seriesSize];
31 double http_requests60[seriesSize];
32 double cache_misses5[seriesSize];
33 double cache_misses60[seriesSize];
34 double cache_hits5[seriesSize];
35 double cache_hits60[seriesSize];
36 double near_hits5[seriesSize];
37 double near_hits60[seriesSize];
38 double not_modified_replies5[seriesSize];
39 double not_modified_replies60[seriesSize];
40 double dns_lookups5[seriesSize];
41 double dns_lookups60[seriesSize];
42 double icp_queries5[seriesSize];
43 double icp_queries60[seriesSize];
44 unsigned int count;
45};
46
47/// implement aggregated 'service_times' action
48class ServiceTimesAction: public Action
49{
50protected:
51 ServiceTimesAction(const CommandPointer &cmd);
52
53public:
54 static Pointer Create(const CommandPointer &cmd);
55 /* Action API */
56 virtual void add(const Action& action);
57 virtual void pack(Ipc::TypedMsgHdr& msg) const;
58 virtual void unpack(const Ipc::TypedMsgHdr& msg);
59
60protected:
61 /* Action API */
62 virtual void collect();
63 virtual void dump(StoreEntry* entry);
64
65private:
66 ServiceTimesActionData data;
67};
68
69} // namespace Mgr
70
71#endif /* SQUID_MGR_SERVICE_TIMES_ACTION_H */
f53969cc 72