]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/IoAction.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / mgr / IoAction.h
CommitLineData
8822ebee 1/*
5b74111a 2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
8822ebee 3 *
bbc27441
AJ
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.
8822ebee
AR
7 */
8
bbc27441
AJ
9/* DEBUG: section 16 Cache Manager API */
10
8822ebee
AR
11#ifndef SQUID_MGR_IO_ACTION_H
12#define SQUID_MGR_IO_ACTION_H
13
9ce629cf 14#include "IoStats.h"
602d9612 15#include "mgr/Action.h"
8822ebee
AR
16
17namespace Mgr
18{
19
d5430dc8 20/// store size histograms of network read() from peer server
8822ebee
AR
21class IoActionData
22{
23public:
24 IoActionData();
25 IoActionData& operator += (const IoActionData& stats);
26
27public:
28 double http_reads;
29 double ftp_reads;
30 double gopher_reads;
9ce629cf
FC
31 double http_read_hist[IoStats::histSize];
32 double ftp_read_hist[IoStats::histSize];
33 double gopher_read_hist[IoStats::histSize];
8822ebee
AR
34};
35
36/// implement aggregated 'io' action
37class IoAction: public Action
38{
39protected:
40 IoAction(const CommandPointer &cmd);
41
42public:
43 static Pointer Create(const CommandPointer &cmd);
44 /* Action API */
45 virtual void add(const Action& action);
46 virtual void pack(Ipc::TypedMsgHdr& msg) const;
47 virtual void unpack(const Ipc::TypedMsgHdr& msg);
48
49protected:
50 /* Action API */
51 virtual void collect();
52 virtual void dump(StoreEntry* entry);
53
54private:
55 IoActionData data;
56};
57
58} // namespace Mgr
59
60#endif /* SQUID_MGR_IO_ACTION_H */
f53969cc 61