CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Log2Histogram Class Reference

#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_int32bins_
 
std::vector< unsigned int > boundary_values_
 

Friends

class UTLog2Histogram
 

Detailed Description

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.

Constructor & Destructor Documentation

Log2Histogram::Log2Histogram ( unsigned int  nbins)
explicit

Definition at line 97 of file algorithm.cc.

Here is the call graph for this function:

Member Function Documentation

void Log2Histogram::Add ( uint64_t  value)
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().

Here is the caller graph for this function:

uint64_t Log2Histogram::N ( )
inline

Returns the total number of elements in the histogram

Definition at line 164 of file algorithm.h.

Referenced by TalkManager::FormatLatencies().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class UTLog2Histogram
friend

Definition at line 142 of file algorithm.h.

Member Data Documentation

std::vector<atomic_int32> Log2Histogram::bins_
private

Definition at line 183 of file algorithm.h.

Referenced by UTLog2Histogram::GetBins().

std::vector<unsigned int> Log2Histogram::boundary_values_
private

Definition at line 186 of file algorithm.h.


The documentation for this class was generated from the following files: