congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CacheStats.loadCount
Code IndexAdd Tabnine to your IDE (free)

How to use
loadCount
method
in
com.google.common.cache.CacheStats

Best Java code snippets using com.google.common.cache.CacheStats.loadCount (Showing top 20 results out of 405)

origin: Netflix/EVCache

@Override
public Number getValue() {
  if (getCache() == null) return Long.valueOf(0);
  return Double.valueOf(getStats().loadCount());
}
origin: Netflix/eureka

/**
 * Gets the number of ASG queries done in the period.
 *
 * @return the long value representing the number of ASG queries done in the
 *         period.
 */
@com.netflix.servo.annotations.Monitor(name = "numOfASGQueries",
    description = "Number of queries made to AWS to retrieve ASG information", type = DataSourceType.COUNTER)
public long getNumberofASGQueries() {
  return asgCache.stats().loadCount();
}
origin: Netflix/servo

@com.netflix.servo.annotations.Monitor(name = "loadCount", type = COUNTER)
long loadCount() {
 return memoStats.get().loadCount();
}
origin: google/guava

assertEquals(1, stats.missCount());
assertEquals(1.0, stats.missRate());
assertEquals(1, stats.loadCount());
long totalLoadTime = stats.totalLoadTime();
assertTrue(totalLoadTime >= 0);
assertEquals(1, stats.missCount());
assertEquals(1.0 / 2, stats.missRate());
assertEquals(1, stats.loadCount());
assertEquals(0, stats.evictionCount());
assertEquals(2, stats.missCount());
assertEquals(2.0 / 3, stats.missRate());
assertEquals(2, stats.loadCount());
assertTrue(stats.totalLoadTime() >= totalLoadTime);
totalLoadTime = stats.totalLoadTime();
assertEquals(3, stats.missCount());
assertEquals(3.0 / 4, stats.missRate());
assertEquals(3, stats.loadCount());
assertTrue(stats.totalLoadTime() >= totalLoadTime);
totalLoadTime = stats.totalLoadTime();
origin: google/guava

public void testEmptySimpleStats() {
 StatsCounter counter = new SimpleStatsCounter();
 CacheStats stats = counter.snapshot();
 assertEquals(0, stats.requestCount());
 assertEquals(0, stats.hitCount());
 assertEquals(1.0, stats.hitRate());
 assertEquals(0, stats.missCount());
 assertEquals(0.0, stats.missRate());
 assertEquals(0, stats.loadSuccessCount());
 assertEquals(0, stats.loadExceptionCount());
 assertEquals(0, stats.loadCount());
 assertEquals(0, stats.totalLoadTime());
 assertEquals(0.0, stats.averageLoadPenalty());
 assertEquals(0, stats.evictionCount());
}
origin: google/guava

public void testSingle() {
 CacheStats stats = new CacheStats(11, 13, 17, 19, 23, 27);
 assertEquals(24, stats.requestCount());
 assertEquals(11, stats.hitCount());
 assertEquals(11.0 / 24, stats.hitRate());
 assertEquals(13, stats.missCount());
 assertEquals(13.0 / 24, stats.missRate());
 assertEquals(17, stats.loadSuccessCount());
 assertEquals(19, stats.loadExceptionCount());
 assertEquals(19.0 / 36, stats.loadExceptionRate());
 assertEquals(17 + 19, stats.loadCount());
 assertEquals(23, stats.totalLoadTime());
 assertEquals(23.0 / (17 + 19), stats.averageLoadPenalty());
 assertEquals(27, stats.evictionCount());
}
origin: google/guava

public void testEmpty() {
 CacheStats stats = new CacheStats(0, 0, 0, 0, 0, 0);
 assertEquals(0, stats.requestCount());
 assertEquals(0, stats.hitCount());
 assertEquals(1.0, stats.hitRate());
 assertEquals(0, stats.missCount());
 assertEquals(0.0, stats.missRate());
 assertEquals(0, stats.loadSuccessCount());
 assertEquals(0, stats.loadExceptionCount());
 assertEquals(0.0, stats.loadExceptionRate());
 assertEquals(0, stats.loadCount());
 assertEquals(0, stats.totalLoadTime());
 assertEquals(0.0, stats.averageLoadPenalty());
 assertEquals(0, stats.evictionCount());
}
origin: ben-manes/caffeine

assertEquals(1, stats.missCount());
assertEquals(1.0, stats.missRate());
assertEquals(1, stats.loadCount());
long totalLoadTime = stats.totalLoadTime();
assertTrue(totalLoadTime >= 0);
assertEquals(1, stats.missCount());
assertEquals(1.0/2, stats.missRate());
assertEquals(1, stats.loadCount());
assertEquals(0, stats.evictionCount());
assertEquals(2, stats.missCount());
assertEquals(2.0/3, stats.missRate());
assertEquals(2, stats.loadCount());
assertTrue(stats.totalLoadTime() >= totalLoadTime);
totalLoadTime = stats.totalLoadTime();
assertEquals(3, stats.missCount());
assertEquals(3.0/4, stats.missRate());
assertEquals(3, stats.loadCount());
assertTrue(stats.totalLoadTime() >= totalLoadTime);
totalLoadTime = stats.totalLoadTime();
origin: google/guava

 public void testPlus() {
  CacheStats one = new CacheStats(11, 13, 15, 13, 11, 9);
  CacheStats two = new CacheStats(53, 47, 41, 39, 37, 35);

  CacheStats sum = two.plus(one);
  assertEquals(124, sum.requestCount());
  assertEquals(64, sum.hitCount());
  assertEquals(64.0 / 124, sum.hitRate());
  assertEquals(60, sum.missCount());
  assertEquals(60.0 / 124, sum.missRate());
  assertEquals(56, sum.loadSuccessCount());
  assertEquals(52, sum.loadExceptionCount());
  assertEquals(52.0 / 108, sum.loadExceptionRate());
  assertEquals(56 + 52, sum.loadCount());
  assertEquals(48, sum.totalLoadTime());
  assertEquals(48.0 / (56 + 52), sum.averageLoadPenalty());
  assertEquals(44, sum.evictionCount());

  assertEquals(sum, one.plus(two));
 }
}
origin: google/guava

public void testMinus() {
 CacheStats one = new CacheStats(11, 13, 17, 19, 23, 27);
 CacheStats two = new CacheStats(53, 47, 43, 41, 37, 31);
 CacheStats diff = two.minus(one);
 assertEquals(76, diff.requestCount());
 assertEquals(42, diff.hitCount());
 assertEquals(42.0 / 76, diff.hitRate());
 assertEquals(34, diff.missCount());
 assertEquals(34.0 / 76, diff.missRate());
 assertEquals(26, diff.loadSuccessCount());
 assertEquals(22, diff.loadExceptionCount());
 assertEquals(22.0 / 48, diff.loadExceptionRate());
 assertEquals(26 + 22, diff.loadCount());
 assertEquals(14, diff.totalLoadTime());
 assertEquals(14.0 / (26 + 22), diff.averageLoadPenalty());
 assertEquals(4, diff.evictionCount());
 assertEquals(new CacheStats(0, 0, 0, 0, 0, 0), one.minus(two));
}
origin: google/guava

assertEquals(13, stats.loadSuccessCount());
assertEquals(17, stats.loadExceptionCount());
assertEquals(13 + 17, stats.loadCount());
assertEquals(214, stats.totalLoadTime());
assertEquals(214.0 / (13 + 17), stats.averageLoadPenalty());
origin: spring-projects/spring-integration

cacheStatistics.put("hitCount", cacheStats.hitCount());
cacheStatistics.put("hitRate", cacheStats.hitRate());
cacheStatistics.put("loadCount", cacheStats.loadCount());
cacheStatistics.put("loadExceptionCount", cacheStats.loadExceptionCount());
cacheStatistics.put("loadExceptionRate", cacheStats.loadExceptionRate());
origin: prometheus/client_java

cacheLoadTotal.addMetric(cacheName, stats.loadCount());
cacheLoadSummary.addMetric(cacheName, stats.loadCount(), stats.totalLoadTime() / Collector.NANOSECONDS_PER_SECOND);
origin: com.bazaarvoice.emodb/emodb-common-dropwizard

  @Override
  public Long getValue() {
    return cache.stats().loadCount();
  }
});
origin: dCache/nfs4j

@Override
public long getLoadCount() {
  return _cache.stats().loadCount();
}
origin: apache/jackrabbit-oak

@Override
public long getLoadCount() {
  return stats().loadCount();
}
origin: spring-projects/spring-integration

@Test
public void testStoredProcExecutorJdbcCallOperationsCache() throws Exception {
  final DataSource datasource = mock(DataSource.class);
  final StoredProcExecutor storedProcExecutor = new StoredProcExecutor(datasource);
  final ExpressionFactoryBean efb = new ExpressionFactoryBean("headers['stored_procedure_name']");
  efb.afterPropertiesSet();
  final Expression expression = efb.getObject();
  storedProcExecutor.setStoredProcedureNameExpression(expression);
  storedProcExecutor.setBeanFactory(mock(BeanFactory.class));
  storedProcExecutor.afterPropertiesSet();
  this.mockTheOperationsCache(storedProcExecutor);
  for (int i = 1; i <= 3; i++) {
    storedProcExecutor.executeStoredProcedure(
        MessageBuilder.withPayload("test")
            .setHeader("stored_procedure_name", "123")
            .build());
  }
  final CacheStats stats = (CacheStats) storedProcExecutor.getJdbcCallOperationsCacheStatistics();
  LOGGER.info(stats);
  LOGGER.info(stats.totalLoadTime() / 1000 / 1000);
  assertEquals(stats.hitCount(), 2);
  assertEquals(stats.missCount(), 1);
  assertEquals(stats.loadCount(), 1);
}
origin: datasift/dropwizard-extra

  @Override public Long getValue() {
    return client.stats().incrementBufferStats()
        .loadCount();
  }
});
origin: com.netflix.eureka/eureka-core

/**
 * Gets the number of ASG queries done in the period.
 *
 * @return the long value representing the number of ASG queries done in the
 *         period.
 */
@com.netflix.servo.annotations.Monitor(name = "numOfASGQueries",
    description = "Number of queries made to AWS to retrieve ASG information", type = DataSourceType.COUNTER)
public long getNumberofASGQueries() {
  return asgCache.stats().loadCount();
}
origin: com.netflix.servo/servo-core

@com.netflix.servo.annotations.Monitor(name = "loadCount", type = COUNTER)
long loadCount() {
 return memoStats.get().loadCount();
}
com.google.common.cacheCacheStatsloadCount

Javadoc

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.

Popular methods of CacheStats

  • hitCount
    Returns the number of times Cache lookup methods have returned a cached value.
  • evictionCount
    Returns the number of times an entry has been evicted. This count does not include manual Cache#inva
  • missCount
    Returns the number of times Cache lookup methods have returned an uncached (newly loaded) value, or
  • loadExceptionCount
    Returns the number of times Cache lookup methods threw an exception while loading a new value. This
  • totalLoadTime
    Returns the total number of nanoseconds the cache has spent loading new values. This can be used to
  • loadSuccessCount
    Returns the number of times Cache lookup methods have successfully loaded a new value. This is alway
  • requestCount
    Returns the number of times Cache lookup methods have returned either a cached or uncached value. Th
  • hitRate
    Returns the ratio of cache requests which were hits. This is defined as hitCount / requestCount, or
  • <init>
    Constructs a new CacheStats instance.Five parameters of the same type in a row is a bad thing, but t
  • missRate
    Returns the ratio of cache requests which were misses. This is defined as missCount / requestCount,
  • averageLoadPenalty
    Returns the average time spent loading new values. This is defined as totalLoadTime / (loadSuccessCo
  • loadExceptionRate
    Returns the ratio of cache loading attempts which threw exceptions. This is defined as loadException
  • averageLoadPenalty,
  • loadExceptionRate,
  • toString,
  • minus,
  • plus

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • compareTo (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now