IntervalAction.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_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 void add(const Action& action) override;
120 void pack(Ipc::TypedMsgHdr& msg) const override;
121 void unpack(const Ipc::TypedMsgHdr& msg) override;
122
123protected:
124 /* Action API */
125 void collect() override;
126 void dump(StoreEntry* entry) override;
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)
void add(const Action &action) override
incrementally merge in remote information (of the same action type)
void pack(Ipc::TypedMsgHdr &msg) const override
pack collected action info into a message to be sent to Coordinator
IntervalActionData data
void unpack(const Ipc::TypedMsgHdr &msg) override
unpack action info from the message received by Coordinator
IntervalAction(const CommandPointer &cmd, int aMinutes, int aHours)
void dump(StoreEntry *entry) override
void collect() override
calculate and keep local action-specific information
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:315

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors