StatCounters.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2025 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 #ifndef SQUID_SRC_STATCOUNTERS_H
10 #define SQUID_SRC_STATCOUNTERS_H
11 
12 #include "base/ByteCounter.h"
13 #include "comm/Incoming.h"
14 #include "StatHist.h"
15 
16 #if USE_CACHE_DIGESTS
17 
19 {
20 public:
21  int trueHits = 0;
22  int falseHits = 0;
23  int trueMisses = 0;
24  int falseMisses = 0;
25 };
26 #endif
27 
34 {
35 public:
37 
38  struct {
39  int clients = 0;
40  int requests = 0;
41  int hits = 0;
42  int mem_hits = 0;
43  int disk_hits = 0;
44  int errors = 0;
53  } client_http;
54 
55  struct {
56 
57  struct {
58  int requests = 0;
59  int errors = 0;
62  } all, http, ftp, other;
63  } server;
64 
65  struct {
66  int pkts_sent = 0;
67  int queries_sent = 0;
68  int replies_sent = 0;
69  int pkts_recv = 0;
70  int queries_recv = 0;
71  int replies_recv = 0;
72  int hits_sent = 0;
73  int hits_recv = 0;
74  int replies_queued = 0;
75  int replies_dropped = 0;
84  int query_timeouts = 0;
85  int times_used = 0;
86  } icp;
87 
88  struct {
89  int pkts_sent = 0;
90  int pkts_recv = 0;
91  } htcp;
92 
93  struct {
94  int requests = 0;
95  } unlink;
96 
97  struct {
99  } dns;
100 
101  struct {
102  int times_used = 0;
106  int msgs_sent = 0;
107  int msgs_recv = 0;
108 #if USE_CACHE_DIGESTS
110 #endif
112  } cd;
113 
114  struct {
115  int times_used = 0;
116  } netdb;
117  int page_faults = 0;
118  unsigned long int select_loops = 0;
119  int select_fds = 0;
120  double select_time = 0.0;
121  double cputime = 0.0;
122 
123  struct timeval timestamp;
124 #if USE_POLL || USE_SELECT
128 #endif
130 
131  struct {
132  struct {
133  int opens = 0;
134  int closes = 0;
135  int reads = 0;
136  int writes = 0;
137  int seeks = 0;
138  int unlinks = 0;
139  } disk;
140 
141  struct {
142  int accepts = 0;
143  int sockets = 0;
144  int connects = 0;
145  int binds = 0;
146  int closes = 0;
147  int reads = 0;
148  int writes = 0;
149  int recvfroms = 0;
150  int sendtos = 0;
151  } sock;
152  int selects = 0;
153  } syscalls;
155 
156  struct {
157  int files_cleaned = 0;
158  int outs = 0;
159  int ins = 0;
160  } swap;
161 
162  struct {
163  uint64_t attempts = 0;
164  uint64_t refusalsDueToLocking = 0;
165  uint64_t refusalsDueToZeroSize = 0;
167  uint64_t failures = 0;
168  } hitValidation;
169 
170 };
171 
173 
174 #endif /* SQUID_SRC_STATCOUNTERS_H */
175 
struct StatCounters::@120 swap
int replies_dropped
Definition: StatCounters.h:75
uint64_t refusalsDueToZeroSize
Definition: StatCounters.h:165
uint64_t refusalsDueToLocking
Definition: StatCounters.h:164
ByteCounter r_kbytes_recv
Definition: StatCounters.h:81
struct StatCounters::@115 unlink
ByteCounter hit_kbytes_out
Definition: StatCounters.h:47
StatHist nearHitSvcTime
Definition: StatCounters.h:50
CacheDigestGuessStats guess
Definition: StatCounters.h:109
struct StatCounters::@117 cd
ByteCounter memory
Definition: StatCounters.h:105
struct StatCounters::@112::@122 all
StatHist replySvcTime
Definition: StatCounters.h:83
StatCounters statCounter
Definition: StatCounters.cc:12
int replies_queued
Definition: StatCounters.h:74
struct StatCounters::@119::@123 disk
Comm::Incoming comm_dns
Definition: StatCounters.h:125
int aborted_requests
Definition: StatCounters.h:154
struct StatCounters::@112 server
struct StatCounters::@116 dns
StatHist on_xition_count
Definition: StatCounters.h:111
struct StatCounters::@111 client_http
double select_time
Definition: StatCounters.h:120
uint64_t failures
Definition: StatCounters.h:167
ByteCounter kbytes_sent
Definition: StatCounters.h:76
struct StatCounters::@119 syscalls
Comm::Incoming comm_udp
Definition: StatCounters.h:127
struct StatCounters::@112::@122 http
ByteCounter kbytes_in
Definition: StatCounters.h:45
StatHist nearMissSvcTime
Definition: StatCounters.h:49
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format
Definition: gadgets.cc:18
StatHist svcTime
Definition: StatCounters.h:98
double cputime
Definition: StatCounters.h:121
StatHist hitSvcTime
Definition: StatCounters.h:51
StatHist missSvcTime
Definition: StatCounters.h:48
struct StatCounters::@119::@124 sock
struct StatCounters::@112::@122 other
uint64_t attempts
Definition: StatCounters.h:163
struct StatCounters::@118 netdb
counter for accumulating byte values
Definition: ByteCounter.h:13
StatHist select_fds_hist
Definition: StatCounters.h:129
StatHist allSvcTime
Definition: StatCounters.h:52
unsigned long int select_loops
Definition: StatCounters.h:118
struct StatCounters::@112::@122 ftp
uint64_t refusalsDueToTimeLimit
Definition: StatCounters.h:166
ByteCounter q_kbytes_sent
Definition: StatCounters.h:77
ByteCounter q_kbytes_recv
Definition: StatCounters.h:80
StatHist querySvcTime
Definition: StatCounters.h:82
struct StatCounters::@121 hitValidation
int query_timeouts
Definition: StatCounters.h:84
Comm::Incoming comm_tcp
Definition: StatCounters.h:126
struct StatCounters::@113 icp
ByteCounter kbytes_out
Definition: StatCounters.h:46
ByteCounter kbytes_recv
Definition: StatCounters.h:79
struct StatCounters::@114 htcp
struct timeval timestamp
Definition: StatCounters.h:123
ByteCounter r_kbytes_sent
Definition: StatCounters.h:78

 

Introduction

Documentation

Support

Miscellaneous