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