IntervalAction.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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
16namespace Mgr
17{
18
22{
23public:
26
27public:
28 struct timeval sample_start_time;
29 struct timeval sample_end_time;
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
111{
112protected:
113 IntervalAction(const CommandPointer &cmd, int aMinutes, int aHours);
114
115public:
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
123protected:
124 /* Action API */
125 virtual void collect();
126 virtual void dump(StoreEntry* entry);
127
128private:
130 int hours;
132};
133
134} // namespace Mgr
135
136#endif /* SQUID_MGR_INTERVAL_ACTION_H */
137
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:35
const CommandPointer cmd
the command that caused this action
Definition: Action.h:86
double hitValidationRefusalsDueToTimeLimit
struct timeval sample_start_time
double hitValidationRefusalsDueToZeroSize
IntervalActionData & operator+=(const IntervalActionData &stats)
double client_http_hit_median_svc_time
double client_http_all_median_svc_time
struct timeval sample_end_time
double hitValidationRefusalsDueToLocking
double client_http_miss_median_svc_time
implement aggregated interval actions
static Pointer Create60min(const CommandPointer &cmd)
static Pointer Create5min(const CommandPointer &cmd)
virtual void collect()
calculate and keep local action-specific information
IntervalActionData data
virtual void unpack(const Ipc::TypedMsgHdr &msg)
unpack action info from the message received by Coordinator
virtual void pack(Ipc::TypedMsgHdr &msg) const
pack collected action info into a message to be sent to Coordinator
virtual void dump(StoreEntry *entry)
IntervalAction(const CommandPointer &cmd, int aMinutes, int aHours)
virtual void add(const Action &action)
incrementally merge in remote information (of the same action type)
Cache Manager API.
Definition: Action.h:20
class Ping::pingStats_ stats
static bool action(int fd, size_t metasize, const char *fn, const char *url, const SquidMetaList &meta)
Definition: purge.cc:311

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors