]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/StoreStats.h
1 #ifndef SQUID_STORE_STATS_H
2 #define SQUID_STORE_STATS_H
4 /// High-level store statistics used by mgr:info action. Used inside PODs!
7 /// Info common to memory and disk parts of the storage. Used inside PODs!
10 double size
; ///< bytes currently in use
11 double count
; ///< number of cached objects
12 double capacity
; ///< the size limit
14 /// mean size of a cached object
15 double meanObjectSize() const { return count
> 0 ? size
/count
: 0.0; }
17 /// number of unused bytes
18 double available() const { return capacity
- size
; }
21 /// disk cache (all cache_dirs) storage stats
22 class Swap
: public Part
{
24 double open_disk_fd
; ///< number of opened disk files
27 /// memory cache (cache_mem) storage stats
28 class Mem
: public Part
{
30 bool shared
; ///< whether memory cache is shared among workers
35 StoreInfoStats
&operator +=(const StoreInfoStats
&stats
);
38 Swap swap
; ///< cache_mem stats
39 Mem mem
; ///< all cache_dirs stats
41 /* stats that could be shared by memory and disk storage */
42 double store_entry_count
; ///< number of StoreEntry objects in existence
43 double mem_object_count
; ///< number of MemObject objects in existence
46 // TODO: this should be adjusted for use in StoreIoActionData, DiskdActionData
47 /// Store statistics related to low-level I/O.
57 } create
; ///< cache_dir selection and disk entry creation stats
60 #endif /* SQUID_STORE_STATS_H */