Stats.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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_SBUF_STATS_H
10 #define SQUID_SBUF_STATS_H
11 
12 #include <iosfwd>
13 
21 class SBufStats
22 {
23 public:
25  std::ostream& dump(std::ostream &os) const;
26 
28 
29 public:
30  uint64_t alloc = 0;
31  uint64_t allocCopy = 0;
32  uint64_t allocFromCString = 0;
33  uint64_t assignFast = 0;
34  uint64_t clear = 0;
35  uint64_t append = 0;
36  uint64_t moves = 0;
37  uint64_t toStream = 0;
38  uint64_t setChar = 0;
39  uint64_t getChar = 0;
40  uint64_t compareSlow = 0;
41  uint64_t compareFast = 0;
42  uint64_t copyOut = 0;
43  uint64_t rawAccess = 0;
44  uint64_t nulTerminate = 0;
45  uint64_t chop = 0;
46  uint64_t trim = 0;
47  uint64_t find = 0;
48  uint64_t caseChange = 0;
49  uint64_t cowFast = 0;
50  uint64_t cowSlow = 0;
51  uint64_t live = 0;
52 };
53 
54 #endif /* SQUID_SBUF_STATS_H */
55 
uint64_t live
number of currently-allocated SBuf
Definition: Stats.h:51
std::ostream & dump(std::ostream &os) const
Dump statistics to an ostream.
Definition: Stats.cc:46
uint64_t chop
number of chop operations
Definition: Stats.h:45
uint64_t toStream
number of write operations to ostreams
Definition: Stats.h:37
uint64_t allocCopy
number of calls to SBuf copy-constructor
Definition: Stats.h:31
uint64_t assignFast
number of no-copy assignment operations
Definition: Stats.h:33
uint64_t append
number of append operations
Definition: Stats.h:35
uint64_t rawAccess
number of accesses to raw contents
Definition: Stats.h:43
uint64_t alloc
number of calls to SBuf constructors
Definition: Stats.h:30
uint64_t trim
number of trim operations
Definition: Stats.h:46
uint64_t clear
number of clear operations
Definition: Stats.h:34
uint64_t compareSlow
number of comparison operations requiring data scan
Definition: Stats.h:40
uint64_t copyOut
number of data-copies to other forms of buffers
Definition: Stats.h:42
uint64_t find
number of find operations
Definition: Stats.h:47
uint64_t cowFast
number of cow operations not actually requiring a copy
Definition: Stats.h:49
uint64_t caseChange
number of toUpper and toLower operations
Definition: Stats.h:48
uint64_t moves
number of move constructions/assignments
Definition: Stats.h:36
uint64_t compareFast
number of comparison operations not requiring data scan
Definition: Stats.h:41
uint64_t setChar
number of calls to setAt
Definition: Stats.h:38
SBufStats & operator+=(const SBufStats &)
Definition: Stats.cc:17
uint64_t allocFromCString
number of copy-allocations from c-strings
Definition: Stats.h:32
uint64_t nulTerminate
number of c_str() terminations
Definition: Stats.h:44
uint64_t getChar
number of calls to at() and operator[]
Definition: Stats.h:39
uint64_t cowSlow
number of cow operations requiring a copy
Definition: Stats.h:50

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors