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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors