-
@MXBean public interface WindowCacheStats
Cache statistics forWindowCache.- Since:
- 4.11
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default doublegetAverageLoadTime()Average time in nanoseconds for loading new values.longgetEvictionCount()Number of cache evictionsdefault doublegetEvictionRatio()Ratio of cache evictions.longgetHitCount()Number of cache hitsdefault doublegetHitRatio()Ratio of cache requests which were hits defined ashitCount / requestCount, or1.0whenrequestCount == 0.default longgetLoadCount()Total number of times that the cache attempted to load new values.longgetLoadFailureCount()Number of failed loadsdefault doublegetLoadFailureRatio()Ratio of cache load attempts which threw exceptions.longgetLoadSuccessCount()Number of successful loadslonggetMissCount()Number of cache misses.default doublegetMissRatio()Ratio of cache requests which were misses defined asmissCount / requestCount, or0.0whenrequestCount == 0.longgetOpenByteCount()Number of bytes cachedMap<String,Long>getOpenByteCountPerRepository()Number of bytes cached per repositorystatic longgetOpenBytes()Deprecated.usegetOpenByteCount()insteadlonggetOpenFileCount()Number of pack files kept open by the cachestatic intgetOpenFiles()Deprecated.usegetOpenFileCount()insteaddefault longgetRequestCount()Number of times the cache returned either a cached or uncached value.static WindowCacheStatsgetStats()longgetTotalLoadTime()Total time in nanoseconds the cache spent loading new values.voidresetCounters()Reset counters.
-
-
-
Method Detail
-
getOpenFiles
@Deprecated static int getOpenFiles()
Deprecated.usegetOpenFileCount()instead- Returns:
- the number of open files.
-
getOpenBytes
@Deprecated static long getOpenBytes()
Deprecated.usegetOpenByteCount()instead- Returns:
- the number of open bytes.
-
getStats
static WindowCacheStats getStats()
- Returns:
- cache statistics for the WindowCache
- Since:
- 5.1.13
-
getHitCount
long getHitCount()
Number of cache hits- Returns:
- number of cache hits
-
getHitRatio
default double getHitRatio()
Ratio of cache requests which were hits defined ashitCount / requestCount, or1.0whenrequestCount == 0. Note thathitRate + missRate =~ 1.0.- Returns:
- the ratio of cache requests which were hits
-
getMissCount
long getMissCount()
Number of cache misses.- Returns:
- number of cash misses
-
getMissRatio
default double getMissRatio()
Ratio of cache requests which were misses defined asmissCount / requestCount, or0.0whenrequestCount == 0. Note thathitRate + missRate =~ 1.0. Cache misses include all requests which weren't cache hits, including requests which resulted in either successful or failed loading attempts.- Returns:
- the ratio of cache requests which were misses
-
getLoadSuccessCount
long getLoadSuccessCount()
Number of successful loads- Returns:
- number of successful loads
-
getLoadFailureCount
long getLoadFailureCount()
Number of failed loads- Returns:
- number of failed loads
-
getLoadFailureRatio
default double getLoadFailureRatio()
Ratio of cache load attempts which threw exceptions. This is defined asloadFailureCount / (loadSuccessCount + loadFailureCount), or0.0whenloadSuccessCount + loadFailureCount == 0.- Returns:
- the ratio of cache loading attempts which threw exceptions
-
getLoadCount
default long getLoadCount()
Total number of times that the cache attempted to load new values. This includes both successful load operations, as well as failed loads. This is defined asloadSuccessCount + loadFailureCount.- Returns:
- the
loadSuccessCount + loadFailureCount
-
getEvictionCount
long getEvictionCount()
Number of cache evictions- Returns:
- number of evictions
-
getEvictionRatio
default double getEvictionRatio()
Ratio of cache evictions. This is defined asevictionCount / requestCount, or0.0whenrequestCount == 0.- Returns:
- the ratio of cache loading attempts which threw exceptions
-
getRequestCount
default long getRequestCount()
Number of times the cache returned either a cached or uncached value. This is defined ashitCount + missCount.- Returns:
- the
hitCount + missCount
-
getAverageLoadTime
default double getAverageLoadTime()
Average time in nanoseconds for loading new values. This istotalLoadTime / (loadSuccessCount + loadFailureCount).- Returns:
- the average time spent loading new values
-
getTotalLoadTime
long getTotalLoadTime()
Total time in nanoseconds the cache spent loading new values.- Returns:
- the total number of nanoseconds the cache has spent loading new values
-
getOpenFileCount
long getOpenFileCount()
Number of pack files kept open by the cache- Returns:
- number of files kept open by cache
-
getOpenByteCount
long getOpenByteCount()
Number of bytes cached- Returns:
- number of bytes cached
-
getOpenByteCountPerRepository
Map<String,Long> getOpenByteCountPerRepository()
Number of bytes cached per repository- Returns:
- number of bytes cached per repository
-
resetCounters
void resetCounters()
Reset counters. Does not reset open bytes and open files counters.
-
-