Package org.eclipse.jgit.storage.file
Interface WindowCacheStats
- All Known Implementing Classes:
WindowCache.StatsRecorderImpl
Cache statistics for
WindowCache.- Since:
- 4.11
-
Method Summary
Modifier and TypeMethodDescriptiondefault doubleAverage time in nanoseconds for loading new values.longNumber of cache evictionsdefault doubleRatio of cache evictions.longNumber of cache hitsdefault doubleRatio of cache requests which were hits defined ashitCount / requestCount, or1.0whenrequestCount == 0.default longTotal number of times that the cache attempted to load new values.longNumber of failed loadsdefault doubleRatio of cache load attempts which threw exceptions.longNumber of successful loadslongNumber of cache misses.default doubleRatio of cache requests which were misses defined asmissCount / requestCount, or0.0whenrequestCount == 0.longNumber of bytes cachedNumber of bytes cached per repositorystatic longDeprecated.longNumber of pack files kept open by the cachestatic intDeprecated.usegetOpenFileCount()insteaddefault longNumber of times the cache returned either a cached or uncached value.static WindowCacheStatsgetStats()longTotal time in nanoseconds the cache spent loading new values.voidReset counters.
-
Method Details
-
getOpenFiles
Deprecated.usegetOpenFileCount()instead- Returns:
- the number of open files.
-
getOpenBytes
Deprecated.usegetOpenByteCount()instead- Returns:
- the number of open bytes.
-
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
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.
-
getOpenByteCount()instead