CernVM-FS
2.12.0
|
#include <algorithm.h>
Public Member Functions | |
Log2Histogram (unsigned int nbins) | |
void | Add (uint64_t value) |
uint64_t | N () |
unsigned int | GetQuantile (float n) |
std::string | ToString () |
void | PrintLog2Histogram () |
Private Attributes | |
std::vector< atomic_int32 > | bins_ |
std::vector< unsigned int > | boundary_values_ |
Friends | |
class | UTLog2Histogram |
Log2Histogram is a simple implementation of log2 histogram data structure which stores and prints log2 histogram. It is used for getting and printing latency metrics of CVMFS fuse calls.
Log2Histogram hist(2); hist.Add(1); hist.Add(2); hist.PrintLog2Histogram();
Definition at line 141 of file algorithm.h.
|
explicit |
|
inline |
Definition at line 147 of file algorithm.h.
unsigned int Log2Histogram::GetQuantile | ( | float | n | ) |
compute the quantile of order n
Definition at line 112 of file algorithm.cc.
Referenced by TalkManager::FormatLatencies().
|
inline |
Returns the total number of elements in the histogram
Definition at line 164 of file algorithm.h.
Referenced by TalkManager::FormatLatencies().
void Log2Histogram::PrintLog2Histogram | ( | ) |
Definition at line 284 of file algorithm.cc.
std::string Log2Histogram::ToString | ( | ) |
Definition at line 142 of file algorithm.cc.
Referenced by TalkManager::MainResponder().
|
friend |
Definition at line 142 of file algorithm.h.
|
private |
Definition at line 183 of file algorithm.h.
Referenced by UTLog2Histogram::GetBins().
|
private |
Definition at line 186 of file algorithm.h.