IntervalAction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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;
99  double cpu_time;
100  double wall_time;
101  unsigned int count;
102 };
103 
105 class IntervalAction: public Action
106 {
107 protected:
108  IntervalAction(const CommandPointer &cmd, int aMinutes, int aHours);
109 
110 public:
111  static Pointer Create5min(const CommandPointer &cmd);
112  static Pointer Create60min(const CommandPointer &cmd);
113  /* Action API */
114  virtual void add(const Action& action);
115  virtual void pack(Ipc::TypedMsgHdr& msg) const;
116  virtual void unpack(const Ipc::TypedMsgHdr& msg);
117 
118 protected:
119  /* Action API */
120  virtual void collect();
121  virtual void dump(StoreEntry* entry);
122 
123 private:
124  int minutes;
125  int hours;
127 };
128 
129 } // namespace Mgr
130 
131 #endif /* SQUID_MGR_INTERVAL_ACTION_H */
132 
virtual void add(const Action &action)
incrementally merge in remote information (of the same action type)
virtual void pack(Ipc::TypedMsgHdr &msg) const
pack collected action info into a message to be sent to Coordinator
class Ping::pingStats_ stats
double client_http_all_median_svc_time
static Pointer Create60min(const CommandPointer &cmd)
virtual void collect()
calculate and keep local action-specific information
implement aggregated interval actions
IntervalActionData & operator+=(const IntervalActionData &stats)
double client_http_miss_median_svc_time
const CommandPointer cmd
the command that caused this action
Definition: Action.h:86
bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:311
struct timeval sample_start_time
virtual void unpack(const Ipc::TypedMsgHdr &msg)
unpack action info from the message received by Coordinator
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:31
struct timeval sample_end_time
IntervalAction(const CommandPointer &cmd, int aMinutes, int aHours)
IntervalActionData data
virtual void dump(StoreEntry *entry)
static Pointer Create5min(const CommandPointer &cmd)
double client_http_hit_median_svc_time

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors