Package org.eclipse.jgit.storage.file
Interface WindowCacheStats
-
@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 double
getAverageLoadTime()
Average time in nanoseconds for loading new values.long
getEvictionCount()
Number of cache evictionsdefault double
getEvictionRatio()
Ratio of cache evictions.long
getHitCount()
Number of cache hitsdefault double
getHitRatio()
Ratio of cache requests which were hits defined ashitCount / requestCount
, or1.0
whenrequestCount == 0
.default long
getLoadCount()
Total number of times that the cache attempted to load new values.long
getLoadFailureCount()
Number of failed loadsdefault double
getLoadFailureRatio()
Ratio of cache load attempts which threw exceptions.long
getLoadSuccessCount()
Number of successful loadslong
getMissCount()
Number of cache misses.default double
getMissRatio()
Ratio of cache requests which were misses defined asmissCount / requestCount
, or0.0
whenrequestCount == 0
.long
getOpenByteCount()
Number of bytes cachedMap<String,Long>
getOpenByteCountPerRepository()
Number of bytes cached per repositorystatic long
getOpenBytes()
Deprecated.usegetOpenByteCount()
insteadlong
getOpenFileCount()
Number of pack files kept open by the cachestatic int
getOpenFiles()
Deprecated.usegetOpenFileCount()
insteaddefault long
getRequestCount()
Number of times the cache returned either a cached or uncached value.static WindowCacheStats
getStats()
long
getTotalLoadTime()
Total time in nanoseconds the cache spent loading new values.void
resetCounters()
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.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
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.
-
-