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 double
Average time in nanoseconds for loading new values.long
Number of cache evictionsdefault double
Ratio of cache evictions.long
Number of cache hitsdefault double
Ratio of cache requests which were hits defined ashitCount / requestCount
, or1.0
whenrequestCount == 0
.default long
Total number of times that the cache attempted to load new values.long
Number of failed loadsdefault double
Ratio of cache load attempts which threw exceptions.long
Number of successful loadslong
Number of cache misses.default double
Ratio of cache requests which were misses defined asmissCount / requestCount
, or0.0
whenrequestCount == 0
.long
Number of bytes cachedNumber of bytes cached per repositorystatic long
Deprecated.long
Number of pack files kept open by the cachestatic int
Deprecated.usegetOpenFileCount()
insteaddefault long
Number of times the cache returned either a cached or uncached value.static WindowCacheStats
getStats()
long
Total time in nanoseconds the cache spent loading new values.void
Reset 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.0
whenrequestCount == 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.0
whenrequestCount == 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.0
whenloadSuccessCount + 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.0
whenrequestCount == 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