Top Description Methods
org.eclipse.jgit.storage.file

public Interface WindowCacheStats

Known Direct Implementers
org.eclipse.jgit.internal.storage.file.WindowCache.StatsRecorderImpl
Annotations
@MXBean
Imports
java.util.Map, javax.management.MXBean, org.eclipse.jgit.internal.storage.file.WindowCache

Cache statistics for WindowCache.
Since
4.11

Method Summary

Modifier and TypeMethod and Description
public default double

Returns:

the average time spent loading new values
getAverageLoadTime
()

Average time in nanoseconds for loading new values.

public long

Returns:

number of evictions
getEvictionCount
()

Number of cache evictions

public default double

Returns:

the ratio of cache loading attempts which threw exceptions
getEvictionRatio
()

Ratio of cache evictions.

public long

Returns:

number of cache hits
getHitCount
()

Number of cache hits

public default double

Returns:

the ratio of cache requests which were hits
getHitRatio
()

Ratio of cache requests which were hits defined as hitCount / requestCount, or 1.0 when requestCount == 0.

public default long

Returns:

the loadSuccessCount + loadFailureCount
getLoadCount
()

Total number of times that the cache attempted to load new values.

public long

Returns:

number of failed loads
getLoadFailureCount
()

Number of failed loads

public default double

Returns:

the ratio of cache loading attempts which threw exceptions
getLoadFailureRatio
()

Ratio of cache load attempts which threw exceptions.

public long

Returns:

number of successful loads
getLoadSuccessCount
()

Number of successful loads

public long

Returns:

number of cash misses
getMissCount
()

Number of cache misses.

public default double

Returns:

the ratio of cache requests which were misses
getMissRatio
()

Ratio of cache requests which were misses defined as missCount / requestCount, or 0.0 when requestCount == 0.

public long

Returns:

number of bytes cached
getOpenByteCount
()

Number of bytes cached

public Map<String, Long>

Returns:

number of bytes cached per repository
getOpenByteCountPerRepository
()

Number of bytes cached per repository

public long

Returns:

number of files kept open by cache
getOpenFileCount
()

Number of pack files kept open by the cache

public default long

Returns:

the hitCount + missCount
getRequestCount
()

Number of times the cache returned either a cached or uncached value.

public static WindowCacheStats

Returns:

cache statistics for the WindowCache
getStats
()

Get cache statistics

public long

Returns:

the total number of nanoseconds the cache has spent loading new values
getTotalLoadTime
()

Total time in nanoseconds the cache spent loading new values.

public void
resetCounters()

Reset counters.

Method Detail

getAverageLoadTimeback to summary
public default double getAverageLoadTime()

Average time in nanoseconds for loading new values. This is totalLoadTime / (loadSuccessCount + loadFailureCount).

Returns:double

the average time spent loading new values

getEvictionCountback to summary
public long getEvictionCount()

Number of cache evictions

Returns:long

number of evictions

getEvictionRatioback to summary
public default double getEvictionRatio()

Ratio of cache evictions. This is defined as evictionCount / requestCount, or 0.0 when requestCount == 0.

Returns:double

the ratio of cache loading attempts which threw exceptions

getHitCountback to summary
public long getHitCount()

Number of cache hits

Returns:long

number of cache hits

getHitRatioback to summary
public default double getHitRatio()

Ratio of cache requests which were hits defined as hitCount / requestCount, or 1.0 when requestCount == 0. Note that hitRate + missRate =~ 1.0.

Returns:double

the ratio of cache requests which were hits

getLoadCountback to summary
public 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 as loadSuccessCount + loadFailureCount.

Returns:long

the loadSuccessCount + loadFailureCount

getLoadFailureCountback to summary
public long getLoadFailureCount()

Number of failed loads

Returns:long

number of failed loads

getLoadFailureRatioback to summary
public default double getLoadFailureRatio()

Ratio of cache load attempts which threw exceptions. This is defined as loadFailureCount / (loadSuccessCount + loadFailureCount), or 0.0 when loadSuccessCount + loadFailureCount == 0.

Returns:double

the ratio of cache loading attempts which threw exceptions

getLoadSuccessCountback to summary
public long getLoadSuccessCount()

Number of successful loads

Returns:long

number of successful loads

getMissCountback to summary
public long getMissCount()

Number of cache misses.

Returns:long

number of cash misses

getMissRatioback to summary
public default double getMissRatio()

Ratio of cache requests which were misses defined as missCount / requestCount, or 0.0 when requestCount == 0. Note that hitRate + 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:double

the ratio of cache requests which were misses

getOpenByteCountback to summary
public long getOpenByteCount()

Number of bytes cached

Returns:long

number of bytes cached

getOpenByteCountPerRepositoryback to summary
public Map<String, Long> getOpenByteCountPerRepository()

Number of bytes cached per repository

Returns:Map<String, Long>

number of bytes cached per repository

getOpenFileCountback to summary
public long getOpenFileCount()

Number of pack files kept open by the cache

Returns:long

number of files kept open by cache

getRequestCountback to summary
public default long getRequestCount()

Number of times the cache returned either a cached or uncached value. This is defined as hitCount + missCount.

Returns:long

the hitCount + missCount

getStatsback to summary
public static WindowCacheStats getStats()

Get cache statistics

Returns:WindowCacheStats

cache statistics for the WindowCache

Since
5.1.13
getTotalLoadTimeback to summary
public long getTotalLoadTime()

Total time in nanoseconds the cache spent loading new values.

Returns:long

the total number of nanoseconds the cache has spent loading new values

resetCountersback to summary
public void resetCounters()

Reset counters. Does not reset open bytes and open files counters.