#include <coherence/net/cache/SimpleCacheStatistics.hpp>
Inherits Object, and CacheStatistics.
Public Types | ||||
typedef spec::Handle | Handle | |||
SimpleCacheStatistics Handle definition. | ||||
typedef spec::View | View | |||
SimpleCacheStatistics View definition. | ||||
typedef spec::Holder | Holder | |||
SimpleCacheStatistics Holder definition. | ||||
Public Member Functions | ||||
virtual int64_t | getTotalGets () const | |||
Determine the total number of get() operations since the cache statistics were last reset.
| ||||
virtual int64_t | getTotalGetsMillis () const | |||
Determine the total number of milliseconds spent on get() operations since the cache statistics were last reset.
| ||||
virtual float64_t | getAverageGetMillis () const | |||
Determine the average number of milliseconds per get() invocation since the cache statistics were last reset.
| ||||
virtual int64_t | getTotalPuts () const | |||
Determine the total number of put() operations since the cache statistics were last reset.
| ||||
virtual int64_t | getTotalPutsMillis () const | |||
Determine the total number of milliseconds spent on put() operations since the cache statistics were last reset.
| ||||
virtual float64_t | getAveragePutMillis () const | |||
Determine the average number of milliseconds per put() invocation since the cache statistics were last reset.
| ||||
virtual int64_t | getCacheHits () const | |||
Determine the rough number of cache hits since the cache statistics were last reset. A cache hit is a read operation invocation (i.e. get()) for which an entry exists in this map.
| ||||
virtual int64_t | getCacheHitsMillis () const | |||
Determine the total number of milliseconds (since that last statistics reset) for the get() operations for which an entry existed in this map.
| ||||
virtual float64_t | getAverageHitMillis () const | |||
Determine the average number of milliseconds per get() invocation that is a hit.
| ||||
virtual int64_t | getCacheMisses () const | |||
Determine the rough number of cache misses since the cache statistics were last reset. A cache miss is a get() invocation that does not have an entry in this map.
| ||||
virtual int64_t | getCacheMissesMillis () const | |||
Determine the total number of milliseconds (since that last statistics reset) for the get() operations for which no entry existed in this map.
| ||||
virtual float64_t | getAverageMissMillis () const | |||
Determine the average number of milliseconds per get() invocation that is a miss.
| ||||
virtual float64_t | getHitProbability () const | |||
Determine the rough probability (0 <= p <= 1) that the next invocation will be a hit, based on the statistics collected since the last reset of the cache statistics.
| ||||
virtual int64_t | getCachePrunes () const | |||
Determine the rough number of cache pruning cycles since the cache statistics were last reset.
For the LocalCache implementation, this refers to the number of times that the
| ||||
virtual int64_t | getCachePrunesMillis () const | |||
Determine the total number of milliseconds (since that last statistics reset) spent on cache pruning.
For the LocalCache implementation, this refers to the time spent in the
| ||||
virtual float64_t | getAveragePruneMillis () const | |||
Determine the average number of milliseconds per cache pruning.
| ||||
virtual void | resetHitStatistics () | |||
Reset the cache statistics. | ||||
virtual void | registerHit () | |||
Register a cache hit (no timing information). | ||||
virtual void | registerHit (int64_t lStartMillis) | |||
Register a cache hit. | ||||
virtual void | registerHits (int32_t cHits, int64_t lStartMillis) | |||
Register a multiple cache hit. | ||||
virtual void | registerMiss () | |||
Register a cache miss (no timing information). | ||||
virtual void | registerMiss (int64_t lStartMillis) | |||
Register a cache miss. | ||||
virtual void | registerMisses (int32_t cMisses, int64_t lStartMillis) | |||
Register a multiple cache miss. | ||||
virtual void | registerPut (int64_t lStartMillis) | |||
Register a cache put. | ||||
virtual void | registerPuts (int32_t cPuts, int64_t lStartMillis) | |||
Register a multiple cache put. | ||||
virtual void | registerCachePrune (int64_t lStartMillis) | |||
Register a cache prune. | ||||
void | toStream (std::ostream &out) const | |||
Output a human-readable description of this Object to the given stream. coherence::lang::operator<<(std::ostream, Object::View) is defined and will call into the toStream method, to output Objects. If a managed String object is desired, the COH_TO_STRING macro can be used to build up a String from streamable contents.
Object::View vKey = ... Object::View vValue = ... std::cout << vKey << " = " << vValue << std::endl; String::Handle hs = COH_TO_STRING(vKey << " = " << vValue);
| ||||
Protected Member Functions | ||||
SimpleCacheStatistics () | ||||
Create a SimpleCacheStatistics object. | ||||
Protected Attributes | ||||
int64_t | m_cCacheHits | |||
The rough (ie unsynchronized) number of calls that could be answered from the front or the back and were answered by data in the front map. | ||||
int64_t | m_cCacheMisses | |||
The rough (ie unsynchronized) number of calls that could be answered from the front or the back and were answered by data in the back map. | ||||
int64_t | m_cHitsMillis | |||
Total number of milliseconds used for get operations that were hits since the last statistics reset. | ||||
int64_t | m_cMissesMillis | |||
Total number of milliseconds used for get operations that were misses since the last statistics reset. | ||||
int64_t | m_cCachePuts | |||
Total number of put operations since the last statistics reset. | ||||
int64_t | m_cPutsMillis | |||
Total number of milliseconds used for put operations since the last statistics reset. | ||||
int64_t | m_cCachePrunes | |||
Total number of evictions triggered based on the size of the cache since the last statistics reset. | ||||
int64_t | m_cCachePrunesMillis | |||
Total number of milliseconds used for prune operations since the last statistics reset. |
virtual void registerHit | ( | int64_t | lStartMillis | ) | [virtual] |
virtual void registerHits | ( | int32_t | cHits, | |
int64_t | lStartMillis | |||
) | [virtual] |
Register a multiple cache hit.
cHits | the number of hits | |
lStartMillis | the time when the get operation started |
virtual void registerMiss | ( | int64_t | lStartMillis | ) | [virtual] |
virtual void registerMisses | ( | int32_t | cMisses, | |
int64_t | lStartMillis | |||
) | [virtual] |
Register a multiple cache miss.
cMisses | the number of misses | |
lStartMillis | the time when the get operation started |
virtual void registerPut | ( | int64_t | lStartMillis | ) | [virtual] |
virtual void registerPuts | ( | int32_t | cPuts, | |
int64_t | lStartMillis | |||
) | [virtual] |
Register a multiple cache put.
cPuts | the number of puts | |
lStartMillis | the time when the put operation started |
virtual void registerCachePrune | ( | int64_t | lStartMillis | ) | [virtual] |