IoAction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
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.
7  */
8 
9 /* DEBUG: section 16 Cache Manager API */
10 
11 #ifndef SQUID_SRC_MGR_IOACTION_H
12 #define SQUID_SRC_MGR_IOACTION_H
13 
14 #include "IoStats.h"
15 #include "mgr/Action.h"
16 
17 namespace Mgr
18 {
19 
22 {
23 public:
24  IoActionData();
25  IoActionData& operator += (const IoActionData& stats);
26 
27 public:
28  double http_reads;
29  double ftp_reads;
32 };
33 
35 class IoAction: public Action
36 {
37 protected:
38  IoAction(const CommandPointer &cmd);
39 
40 public:
41  static Pointer Create(const CommandPointer &cmd);
42  /* Action API */
43  void add(const Action& action) override;
44  void pack(Ipc::TypedMsgHdr& msg) const override;
45  void unpack(const Ipc::TypedMsgHdr& msg) override;
46 
47 protected:
48  /* Action API */
49  void collect() override;
50  void dump(StoreEntry* entry) override;
51 
52 private:
54 };
55 
56 } // namespace Mgr
57 
58 #endif /* SQUID_SRC_MGR_IOACTION_H */
59 
double ftp_reads
Definition: IoAction.h:29
static const int histSize
Definition: IoStats.h:16
void collect() override
calculate and keep local action-specific information
Definition: IoAction.cc:62
store size histograms of network read() from peer server
Definition: IoAction.h:21
const CommandPointer cmd
the command that caused this action
Definition: Action.h:90
IoActionData & operator+=(const IoActionData &stats)
Definition: IoAction.cc:30
double http_reads
Definition: IoAction.h:28
IoAction(const CommandPointer &cmd)
Definition: IoAction.cc:48
double ftp_read_hist[IoStats::histSize]
Definition: IoAction.h:31
void unpack(const Ipc::TypedMsgHdr &msg) override
unpack action info from the message received by Coordinator
Definition: IoAction.cc:83
implement aggregated 'io' action
Definition: IoAction.h:35
void dump(StoreEntry *entry) override
Definition: IoAction.cc:68
static Pointer Create(const CommandPointer &cmd)
Definition: IoAction.cc:43
void add(const Action &action) override
incrementally merge in remote information (of the same action type)
Definition: IoAction.cc:55
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:34
double http_read_hist[IoStats::histSize]
Definition: IoAction.h:30
IoActionData data
Definition: IoAction.h:53
void pack(Ipc::TypedMsgHdr &msg) const override
pack collected action info into a message to be sent to Coordinator
Definition: IoAction.cc:76
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous