BuildCache
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
bcache::cache_stats_t Class Reference

Public Member Functions

bool from_file (const std::string &path) noexcept
 
bool from_json (cJSON const *obj) noexcept
 
bool to_json (cJSON *obj) const noexcept
 
bool to_file (const std::string &path) const noexcept
 
cache_stats_toperator+= (const cache_stats_t &other) noexcept
 
double direct_hit_ratio () const noexcept
 
double local_hit_ratio () const noexcept
 
double remote_hit_ratio () const noexcept
 
int global_hit_count () const noexcept
 Hit either the local or the remote cache.
 
int global_miss_count () const noexcept
 Missed both local and remote cache.
 
double global_hit_ratio () const noexcept
 
void dump (std::ostream &os, const std::string &prefix) const
 

Static Public Member Functions

static cache_stats_t direct_hit () noexcept
 
static cache_stats_t direct_miss () noexcept
 
static cache_stats_t local_hit () noexcept
 
static cache_stats_t local_miss () noexcept
 
static cache_stats_t remote_miss () noexcept
 
static cache_stats_t remote_hit () noexcept
 

Private Attributes

int m_direct_miss_count {0}
 
int m_direct_hit_count {0}
 
int m_local_miss_count {0}
 
int m_local_hit_count {0}
 
int m_remote_hit_count {0}
 
int m_remote_miss_count {0}
 

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