CountersAction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2020 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_MGR_COUNTERS_ACTION_H
12 #define SQUID_MGR_COUNTERS_ACTION_H
13 
14 #include "mgr/Action.h"
15 
16 namespace Mgr
17 {
18 
21 {
22 public:
25 
26 public:
27  struct timeval sample_time;
50  double icp_pkts_sent;
51  double icp_pkts_recv;
64 #if USE_CACHE_DIGESTS
66  double cd_times_used;
67  double cd_msgs_sent;
68  double cd_msgs_recv;
69  double cd_memory;
73 #endif
75  double page_faults;
76  double select_loops;
77  double cpu_time;
78  double wall_time;
79  double swap_outs;
80  double swap_ins;
88 };
89 
91 class CountersAction: public Action
92 {
93 protected:
95 
96 public:
97  static Pointer Create(const CommandPointer &cmd);
98  /* Action API */
99  virtual void add(const Action& action);
100  virtual void pack(Ipc::TypedMsgHdr& msg) const;
101  virtual void unpack(const Ipc::TypedMsgHdr& msg);
102 
103 protected:
104  /* Action API */
105  virtual void collect();
106  virtual void dump(StoreEntry* entry);
107 
108 private:
110 };
111 
112 } // namespace Mgr
113 
114 #endif /* SQUID_MGR_COUNTERS_ACTION_H */
115 
class Ping::pingStats_ stats
static Pointer Create(const CommandPointer &cmd)
CountersActionData & operator+=(const CountersActionData &stats)
const CommandPointer cmd
the command that caused this action
Definition: Action.h:86
double hitValidationRefusalsDueToTimeLimit
bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:311
CountersAction(const CommandPointer &cmd)
store traffic and resource counters
double hitValidationRefusalsDueToZeroSize
virtual void collect()
calculate and keep local action-specific information
double hitValidationRefusalsDueToLocking
virtual void pack(Ipc::TypedMsgHdr &msg) const
pack collected action info into a message to be sent to Coordinator
virtual void unpack(const Ipc::TypedMsgHdr &msg)
unpack action info from the message received by Coordinator
struct timeval sample_time
virtual void add(const Action &action)
incrementally merge in remote information (of the same action type)
CountersActionData data
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:32
virtual void dump(StoreEntry *entry)
implement aggregated 'counters' action
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors