org.feijoas.mango.common.cache

CacheStats

Related Docs: object CacheStats | package cache

case class CacheStats(hitCount: Long, missCount: Long, loadSuccessCount: Long, loadExceptionCount: Long, totalLoadTime: Long, evictionCount: Long) extends Product with Serializable

Statistics about the performance of a Cache. Instances of this class are immutable.

Cache statistics are incremented according to the following rules:

A lookup is specifically defined as an invocation of one of the methods LoadingCache#get(key), Cache#get(key, loader), or LoadingCache#getAll(keys).

Since

0.7 (copied from Guava-libraries)

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CacheStats
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CacheStats(hitCount: Long, missCount: Long, loadSuccessCount: Long, loadExceptionCount: Long, totalLoadTime: Long, evictionCount: Long)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def +(other: CacheStats): CacheStats

    Returns a new CacheStats representing the sum of this CacheStats and other.

  4. def -(other: CacheStats): CacheStats

    Returns a new CacheStats representing the difference between this CacheStats and other.

    Returns a new CacheStats representing the difference between this CacheStats and other. Negative values, which aren't supported by CacheStats will be rounded up to zero.

  5. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def averageLoadPenalty(): Double

    Returns the average time spent loading new values.

    Returns the average time spent loading new values. This is defined as totalLoadTime / (loadSuccessCount + loadExceptionCount).

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. val evictionCount: Long

  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. val hitCount: Long

  14. def hitRate(): Double

    Returns the ratio of cache requests which were hits.

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

  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def loadCount: Long

    Returns the total number of times that Cache lookup methods attempted to load new values.

    Returns the total number of times that Cache lookup methods attempted to load new values. This includes both successful load operations, as well as those that threw exceptions. This is defined as loadSuccessCount + loadExceptionCount.

  17. val loadExceptionCount: Long

  18. def loadExceptionRate(): Double

    Returns the ratio of cache loading attempts which threw exceptions.

    Returns the ratio of cache loading attempts which threw exceptions. This is defined as loadExceptionCount / (loadSuccessCount + loadExceptionCount), or 0.0 when loadSuccessCount + loadExceptionCount == 0.

  19. val loadSuccessCount: Long

  20. val missCount: Long

  21. def missRate(): Double

    Returns the ratio of cache requests which were misses.

    Returns the ratio of cache requests which were misses. This is 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, and requests which waited for other threads to finish loading. It is thus the case that missCount >= loadSuccessCount + loadExceptionCount. Multiple concurrent misses for the same key will result in a single load operation.

  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. def requestCount: Long

    Returns the number of times Cache lookup methods have returned either a cached or uncached value.

    Returns the number of times Cache lookup methods have returned either a cached or uncached value. This is defined as hitCount + missCount.

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toString(): String

    Definition Classes
    CacheStats → AnyRef → Any
  28. val totalLoadTime: Long

  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped