libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics Class Reference

Some basic statistic gathering. More...

#include <cache.hpp>

Public Types

typedef unsigned long accesses_type
 
typedef unsigned long hits_type
 
typedef unsigned long flushes_type
 
typedef unsigned long creations_type
 

Public Member Functions

constexpr __stdcall basic_statistics (void) noexcept(true)
 
__stdcall basic_statistics (const basic_statistics &) noexcept(true)
 
virtual __stdcall ~basic_statistics (void) noexcept(true)
 
basic_statistics &__fastcall operator= (const basic_statistics &) noexcept(true)
 
accesses_type __fastcall accesses (void) const noexcept(true)
 Total number of accesses to the cache. More...
 
hits_type __fastcall hits (void) const noexcept(true)
 Total number of hits into the cache. More...
 
flushes_type __fastcall flushes (void) const noexcept(true)
 Total number of cache flushes. More...
 
creations_type __fastcall outstanding_fills (void) const noexcept(true)
 Total number of outstanding cache fills. More...
 
void __fastcall accessed (void) noexcept(true)
 Increment the "accessed" counter by 1. More...
 
void __fastcall hit (void) noexcept(true)
 Increment the "total hits" counter by 1. More...
 
void __fastcall flushed (void) noexcept(true)
 Increment the "total flushes" counter by 1. More...
 
void __fastcall reset (void) noexcept(true)
 Reset all of the counters. More...
 

Friends

tostreamoperator<< (tostream &os, const basic_statistics &stats)
 Write all of the statistics to an output stream, in a formatted manner. More...
 

Detailed Description

Some basic statistic gathering.

Definition at line 214 of file cache.hpp.

Member Typedef Documentation

◆ accesses_type

Definition at line 216 of file cache.hpp.

◆ creations_type

◆ flushes_type

Definition at line 218 of file cache.hpp.

◆ hits_type

Definition at line 217 of file cache.hpp.

Constructor & Destructor Documentation

◆ basic_statistics() [1/2]

constexpr jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::basic_statistics ( void  )
inlineconstexprnoexcept

Definition at line 65 of file cache_impl.hpp.

◆ basic_statistics() [2/2]

jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::basic_statistics ( const basic_statistics bs)
inlinenoexcept

Definition at line 70 of file cache_impl.hpp.

◆ ~basic_statistics()

jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::~basic_statistics ( void  )
inlinevirtualnoexcept

Definition at line 75 of file cache_impl.hpp.

Member Function Documentation

◆ accessed()

void jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::accessed ( void  )
inlinenoexcept

Increment the "accessed" counter by 1.

Definition at line 122 of file cache_impl.hpp.

◆ accesses()

basic_statistics::accesses_type jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::accesses ( void  ) const
inlinenoexcept

Total number of accesses to the cache.

Definition at line 87 of file cache_impl.hpp.

◆ flushed()

void jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::flushed ( void  )
inlinenoexcept

Increment the "total flushes" counter by 1.

Definition at line 132 of file cache_impl.hpp.

◆ flushes()

basic_statistics::hits_type jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::flushes ( void  ) const
inlinenoexcept

Total number of cache flushes.

Definition at line 97 of file cache_impl.hpp.

◆ hit()

void jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::hit ( void  )
inlinenoexcept

Increment the "total hits" counter by 1.

Definition at line 127 of file cache_impl.hpp.

◆ hits()

basic_statistics::hits_type jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::hits ( void  ) const
inlinenoexcept

Total number of hits into the cache.

Definition at line 92 of file cache_impl.hpp.

◆ operator=()

basic_statistics & jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::operator= ( const basic_statistics bs)
inlinenoexcept

Definition at line 79 of file cache_impl.hpp.

◆ outstanding_fills()

basic_statistics::creations_type jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::outstanding_fills ( void  ) const
inlinenoexcept

Total number of outstanding cache fills.

More useful for the multi-threaded cache to help tune the cache high- and low-water marks and pool size for creating range-data the cache.

Todo:
JMG need to compute this.

Definition at line 102 of file cache_impl.hpp.

◆ reset()

void jmmcg::LIBJMMCG_VER_NAMESPACE::cache::basic_statistics::reset ( void  )
inlinenoexcept

Reset all of the counters.

Definition at line 137 of file cache_impl.hpp.

Friends And Related Function Documentation

◆ operator<<

tostream& operator<< ( tostream os,
const basic_statistics stats 
)
friend

Write all of the statistics to an output stream, in a formatted manner.

Parameters
osThe output stream, templated for narrow or wide char use, based upon the definition or not of the preprocessor constant JMMCG_WIDE_CHARS. Idf not defined, standard "char" traits are used, otherwise "wchar_t" traits.
statsThe basic_statistics object that should be written.
Returns
A reference to that "std::ostream" that was passed in.
Todo:
Implement using the advice given in "Standard C++ IOStreams and Locales" by A.Langer & K.Kreft, page 170.

Definition at line 110 of file cache_impl.hpp.


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