2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
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.
9 /* DEBUG: section 16 Cache Manager API */
11 #ifndef SQUID_SRC_MGR_SERVICETIMESACTION_H
12 #define SQUID_SRC_MGR_SERVICETIMESACTION_H
14 #include "mgr/Action.h"
19 /// store service times for 5 and 60 min
20 class ServiceTimesActionData
23 enum { seriesSize
= 19 };
26 ServiceTimesActionData();
27 ServiceTimesActionData
& operator += (const ServiceTimesActionData
& stats
);
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
];
47 /// implement aggregated 'service_times' action
48 class ServiceTimesAction
: public Action
51 ServiceTimesAction(const CommandPointer
&cmd
);
54 static Pointer
Create(const CommandPointer
&cmd
);
56 void add(const Action
& action
) override
;
57 void pack(Ipc::TypedMsgHdr
& msg
) const override
;
58 void unpack(const Ipc::TypedMsgHdr
& msg
) override
;
62 void collect() override
;
63 void dump(StoreEntry
* entry
) override
;
66 ServiceTimesActionData data
;
71 #endif /* SQUID_SRC_MGR_SERVICETIMESACTION_H */