Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::Stats Class Reference

#include <stats.hpp>

Public Member Functions

void reset ()
 
void increment (const std::string &key, uint64_t value)
 
void time (const std::string &key, const std::function< void()> &f)
 
template<typename F >
auto time_r (const std::string &key, F &&f)
 
std::string to_string (int depth=2) const
 

Static Public Member Functions

static Statsget ()
 

Private Member Functions

 Stats ()=default
 

Private Attributes

std::unordered_map< std::string, uint64_tstats
 
std::mutex stats_mutex
 

Detailed Description

Definition at line 27 of file stats.hpp.

Constructor & Destructor Documentation

◆ Stats()

bb::avm2::Stats::Stats ( )
privatedefault

Member Function Documentation

◆ get()

Stats & bb::avm2::Stats::get ( )
static

Definition at line 10 of file stats.cpp.

◆ increment()

void bb::avm2::Stats::increment ( const std::string &  key,
uint64_t  value 
)

Definition at line 21 of file stats.cpp.

◆ reset()

void bb::avm2::Stats::reset ( )

Definition at line 16 of file stats.cpp.

◆ time()

void bb::avm2::Stats::time ( const std::string &  key,
const std::function< void()> &  f 
)

Definition at line 27 of file stats.cpp.

◆ time_r()

template<typename F >
auto bb::avm2::Stats::time_r ( const std::string &  key,
F &&  f 
)
inline

Definition at line 34 of file stats.hpp.

◆ to_string()

std::string bb::avm2::Stats::to_string ( int  depth = 2) const

Definition at line 36 of file stats.cpp.

Member Data Documentation

◆ stats

std::unordered_map<std::string, uint64_t> bb::avm2::Stats::stats
private

Definition at line 53 of file stats.hpp.

◆ stats_mutex

std::mutex bb::avm2::Stats::stats_mutex
mutableprivate

Definition at line 54 of file stats.hpp.


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