DetailedStats.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2019 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 #include "squid.h"
10 #include "sbuf/DetailedStats.h"
11 #include "StatHist.h"
12 
13 /*
14  * Implementation note: the purpose of this construct is to avoid adding
15  * external dependencies to the SBuf code
16  */
17 
18 static StatHist *
20  StatHist *stats = new StatHist;
21  stats->logInit(100, 30.0, 128000.0);
22  return stats;
23 }
24 
25 StatHist &
27 {
28  static StatHist *stats = newStatHist();
29  return *stats;
30 }
31 
32 StatHist &
34 {
35  static StatHist *stats = newStatHist();
36  return *stats;
37 }
38 
39 void
41 {
42  collectSBufDestructTimeStats().count(static_cast<double>(sz));
43 }
44 
45 void
47 {
48  collectMemBlobDestructTimeStats().count(static_cast<double>(sz));
49 }
50 
void count(double val)
Definition: StatHist.cc:57
class Ping::pingStats_ stats
static StatHist * newStatHist()
void logInit(unsigned int capacity, double min, double max)
Definition: StatHist.cc:223
void const char int sz
Definition: stub_cbdata.cc:16
void recordSBufSizeAtDestruct(SBuf::size_type sz)
Record the size a SBuf had when it was destructed.
StatHist & collectMemBlobDestructTimeStats()
the MemBlob size-at-destruct-time histogram
void recordMemBlobSizeAtDestruct(SBuf::size_type sz)
Record the size a MemBlob had when it was destructed.
StatHist & collectSBufDestructTimeStats()
the SBuf size-at-destruct-time histogram
MemBlob::size_type size_type
Definition: SBuf.h:89

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors