Interface WindowCacheStats

All Known Implementing Classes:
WindowCache.StatsRecorderImpl

@MXBean public interface WindowCacheStats
Cache statistics for WindowCache.
Since:
4.11
  • Method Details

    • getOpenFiles

      @Deprecated static int getOpenFiles()
      Deprecated.
      use getOpenFileCount() instead
      Returns:
      the number of open files.
    • getOpenBytes

      @Deprecated static long getOpenBytes()
      Deprecated.
      use getOpenByteCount() 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 as hitCount / requestCount, or 1.0 when requestCount == 0. Note that hitRate + 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 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:
      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 as loadFailureCount / (loadSuccessCount + loadFailureCount), or 0.0 when loadSuccessCount + 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 as loadSuccessCount + 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 as evictionCount / requestCount, or 0.0 when requestCount == 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 as hitCount + missCount.
      Returns:
      the hitCount + missCount
    • getAverageLoadTime

      default double getAverageLoadTime()
      Average time in nanoseconds for loading new values. This is totalLoadTime / (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.