]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/IoAction.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / mgr / IoAction.h
CommitLineData
8822ebee 1/*
8822ebee
AR
2 * DEBUG: section 16 Cache Manager API
3 *
4 */
5
6#ifndef SQUID_MGR_IO_ACTION_H
7#define SQUID_MGR_IO_ACTION_H
8
9ce629cf 9#include "IoStats.h"
602d9612 10#include "mgr/Action.h"
8822ebee
AR
11
12namespace Mgr
13{
14
15/// store server-side network read() size histograms
16class IoActionData
17{
18public:
19 IoActionData();
20 IoActionData& operator += (const IoActionData& stats);
21
22public:
23 double http_reads;
24 double ftp_reads;
25 double gopher_reads;
9ce629cf
FC
26 double http_read_hist[IoStats::histSize];
27 double ftp_read_hist[IoStats::histSize];
28 double gopher_read_hist[IoStats::histSize];
8822ebee
AR
29};
30
31/// implement aggregated 'io' action
32class IoAction: public Action
33{
34protected:
35 IoAction(const CommandPointer &cmd);
36
37public:
38 static Pointer Create(const CommandPointer &cmd);
39 /* Action API */
40 virtual void add(const Action& action);
41 virtual void pack(Ipc::TypedMsgHdr& msg) const;
42 virtual void unpack(const Ipc::TypedMsgHdr& msg);
43
44protected:
45 /* Action API */
46 virtual void collect();
47 virtual void dump(StoreEntry* entry);
48
49private:
50 IoActionData data;
51};
52
53} // namespace Mgr
54
55#endif /* SQUID_MGR_IO_ACTION_H */