IntervalAction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2021 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_INTERVAL_ACTION_H
12 #define SQUID_MGR_INTERVAL_ACTION_H
13 
14 #include "mgr/Action.h"
15 
16 namespace Mgr
17 {
18 
22 {
23 public:
26 
27 public:
28  struct timeval sample_start_time;
29  struct timeval sample_end_time;
56  double icp_pkts_sent;
57  double icp_pkts_recv;
74  double page_faults;
75  double select_loops;
76  double select_fds;
79  double swap_outs;
80  double swap_ins;
104  double cpu_time;
105  double wall_time;
106  unsigned int count;
107 };
108 
110 class IntervalAction: public Action
111 {
112 protected:
113  IntervalAction(const CommandPointer &cmd, int aMinutes, int aHours);
114 
115 public:
116  static Pointer Create5min(const CommandPointer &cmd);
117  static Pointer Create60min(const CommandPointer &cmd);
118  /* Action API */
119  virtual void add(const Action& action);
120  virtual void pack(Ipc::TypedMsgHdr& msg) const;
121  virtual void unpack(const Ipc::TypedMsgHdr& msg);
122 
123 protected:
124  /* Action API */
125  virtual void collect();
126  virtual void dump(StoreEntry* entry);
127 
128 private:
129  int minutes;
130  int hours;
132 };
133 
134 } // namespace Mgr
135 
136 #endif /* SQUID_MGR_INTERVAL_ACTION_H */
137 
static bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:311
class Ping::pingStats_ stats
IntervalActionData data
const CommandPointer cmd
the command that caused this action
Definition: Action.h:86
double client_http_all_median_svc_time
IntervalActionData & operator+=(const IntervalActionData &stats)
struct timeval sample_start_time
struct timeval sample_end_time
virtual void collect()
calculate and keep local action-specific information
static Pointer Create5min(const CommandPointer &cmd)
double client_http_miss_median_svc_time
virtual void pack(Ipc::TypedMsgHdr &msg) const
pack collected action info into a message to be sent to Coordinator
virtual void add(const Action &action)
incrementally merge in remote information (of the same action type)
double hitValidationRefusalsDueToTimeLimit
double hitValidationRefusalsDueToZeroSize
virtual void unpack(const Ipc::TypedMsgHdr &msg)
unpack action info from the message received by Coordinator
double client_http_hit_median_svc_time
virtual void dump(StoreEntry *entry)
IntervalAction(const CommandPointer &cmd, int aMinutes, int aHours)
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:33
implement aggregated interval actions
double hitValidationRefusalsDueToLocking
static Pointer Create60min(const CommandPointer &cmd)
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors