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

 

Introduction

Documentation

Support

Miscellaneous