StoreStats.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_STORE_STATS_H
10#define SQUID_STORE_STATS_H
11
14{
15public:
17 class Part
18 {
19 public:
20 double size = 0.0;
21 double count = 0.0;
22 double capacity = 0.0;
23
25 double meanObjectSize() const { return count > 0 ? size/count : 0.0; }
26
28 double available() const { return capacity - size; }
29 };
30
32 class Swap: public Part
33 {
34 public:
35 double open_disk_fd = 0.0;
36 };
37
39 class Mem: public Part
40 {
41 public:
42 bool shared = false;
43 };
44
46
49
50 /* stats that could be shared by memory and disk storage */
51 double store_entry_count = 0.0;
52 double mem_object_count = 0.0;
53};
54
55// TODO: this should be adjusted for use in StoreIoActionData, DiskdActionData
58{
59public:
61
62 struct {
63 int calls;
68};
69
70#endif /* SQUID_STORE_STATS_H */
71
bool shared
whether memory cache is shared among workers
Definition: StoreStats.h:42
Info common to memory and disk parts of the storage. Used inside PODs!
Definition: StoreStats.h:18
double capacity
the size limit
Definition: StoreStats.h:22
double count
number of cached objects
Definition: StoreStats.h:21
double meanObjectSize() const
mean size of a cached object
Definition: StoreStats.h:25
double available() const
number of unused bytes
Definition: StoreStats.h:28
double size
bytes currently in use
Definition: StoreStats.h:20
disk cache (all cache_dirs) storage stats
Definition: StoreStats.h:33
double open_disk_fd
number of opened disk files
Definition: StoreStats.h:35
High-level store statistics used by mgr:info action. Used inside PODs!
Definition: StoreStats.h:14
double store_entry_count
number of StoreEntry objects in existence
Definition: StoreStats.h:51
Swap swap
cache_mem stats
Definition: StoreStats.h:47
Mem mem
all cache_dirs stats
Definition: StoreStats.h:48
double mem_object_count
number of MemObject objects in existence
Definition: StoreStats.h:52
StoreInfoStats & operator+=(const StoreInfoStats &stats)
Definition: StoreStats.cc:16
Store statistics related to low-level I/O.
Definition: StoreStats.h:58
int select_fail
Definition: StoreStats.h:64
struct StoreIoStats::@144 create
cache_dir selection and disk entry creation stats
int create_fail
Definition: StoreStats.h:65
Memory Management.
Definition: Allocator.h:17
class Ping::pingStats_ stats

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors