]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/IoAction.h
6487247c1fbc59aa6a785abaea8a9014716c41d4
[thirdparty/squid.git] / src / mgr / IoAction.h
1 /*
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
9 #include "mgr/Action.h"
10 #include "IoStats.h"
11
12 namespace Mgr
13 {
14
15 /// store server-side network read() size histograms
16 class IoActionData
17 {
18 public:
19 IoActionData();
20 IoActionData& operator += (const IoActionData& stats);
21
22 public:
23 double http_reads;
24 double ftp_reads;
25 double gopher_reads;
26 double http_read_hist[IoStats::histSize];
27 double ftp_read_hist[IoStats::histSize];
28 double gopher_read_hist[IoStats::histSize];
29 };
30
31 /// implement aggregated 'io' action
32 class IoAction: public Action
33 {
34 protected:
35 IoAction(const CommandPointer &cmd);
36
37 public:
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
44 protected:
45 /* Action API */
46 virtual void collect();
47 virtual void dump(StoreEntry* entry);
48
49 private:
50 IoActionData data;
51 };
52
53 } // namespace Mgr
54
55 #endif /* SQUID_MGR_IO_ACTION_H */