]>
Commit | Line | Data |
---|---|---|
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 | ||
14 | namespace Mgr | |
15 | { | |
16 | ||
17 | /// store server-side network read() size histograms | |
18 | class IoActionData | |
19 | { | |
20 | public: | |
21 | IoActionData(); | |
22 | IoActionData& operator += (const IoActionData& stats); | |
23 | ||
24 | public: | |
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 | |
34 | class IoAction: public Action | |
35 | { | |
36 | protected: | |
37 | IoAction(const CommandPointer &cmd); | |
38 | ||
39 | public: | |
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 | ||
46 | protected: | |
47 | /* Action API */ | |
48 | virtual void collect(); | |
49 | virtual void dump(StoreEntry* entry); | |
50 | ||
51 | private: | |
52 | IoActionData data; | |
53 | }; | |
54 | ||
55 | } // namespace Mgr | |
56 | ||
57 | #endif /* SQUID_MGR_IO_ACTION_H */ |