Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for CacheStats (0.05 sec)

  1. android/guava/src/com/google/common/cache/CacheStats.java

        return evictionCount;
      }
    
      /**
       * Returns a new {@code CacheStats} representing the difference between this {@code CacheStats}
       * and {@code other}. Negative values, which aren't supported by {@code CacheStats} will be
       * rounded up to zero.
       */
      public CacheStats minus(CacheStats other) {
        return new CacheStats(
            max(0, saturatedSubtract(hitCount, other.hitCount)),
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/CacheLoadingTest.java

      }
    
      public void testLoad() throws ExecutionException {
        LoadingCache<Object, Object> cache =
            CacheBuilder.newBuilder().recordStats().build(identityLoader());
        CacheStats stats = cache.stats();
        assertEquals(0, stats.missCount());
        assertEquals(0, stats.loadSuccessCount());
        assertEquals(0, stats.loadExceptionCount());
        assertEquals(0, stats.hitCount());
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 85.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/AbstractCacheTest.java

        cache.invalidateAll(toInvalidate);
        assertEquals(toInvalidate, invalidated);
      }
    
      public void testEmptySimpleStats() {
        StatsCounter counter = new SimpleStatsCounter();
        CacheStats stats = counter.snapshot();
        assertEquals(0, stats.requestCount());
        assertEquals(0, stats.hitCount());
        assertThat(stats.hitRate()).isEqualTo(1.0);
        assertEquals(0, stats.missCount());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/cache/Cache.java

       * created using {@link CacheBuilder} only does so if the {@link CacheBuilder#recordStats} method
       * was called. If statistics are not being recorded, a {@code CacheStats} instance with zero for
       * all values is returned.
       *
       */
      CacheStats stats();
    
      /**
       * Returns a view of the entries stored in this cache as a thread-safe map. Modifications made to
       * the map directly affect the cache.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/cache/package-info.java

     * configured and created using {@link CacheBuilder}, with cache entries being loaded by {@link
     * CacheLoader}. Statistics about cache performance are exposed using {@link CacheStats}.
     *
     * <p>See the Guava User Guide article on <a
     * href="https://github.com/google/guava/wiki/CachesExplained">caches</a>.
     *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jan 03 19:02:39 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/cache/CacheBuilder.java

                @Override
                public void recordEviction() {}
    
                @Override
                public CacheStats snapshot() {
                  return EMPTY_STATS;
                }
              });
      static final CacheStats EMPTY_STATS = new CacheStats(0, 0, 0, 0, 0, 0);
    
      /*
       * We avoid using a method reference or lambda here for now:
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 51.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

        LocalLoadingCache<Object, Object> cache = makeCache(builder, identityLoader());
        assertEquals(EMPTY_STATS, cache.stats());
    
        Object one = new Object();
        cache.getUnchecked(one);
        CacheStats stats = cache.stats();
        assertEquals(1, stats.requestCount());
        assertEquals(0, stats.hitCount());
        assertThat(stats.hitRate()).isEqualTo(0.0);
        assertEquals(1, stats.missCount());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/cache/Cache.java

       * created using {@link CacheBuilder} only does so if the {@link CacheBuilder#recordStats} method
       * was called. If statistics are not being recorded, a {@code CacheStats} instance with zero for
       * all values is returned.
       *
       */
      CacheStats stats();
    
      /**
       * Returns a view of the entries stored in this cache as a thread-safe map. Modifications made to
       * the map directly affect the cache.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        for (RemovalNotification<String, String> notification : removalListener) {
          assertEquals("Invalid removal notification", notification.getKey(), notification.getValue());
        }
    
        CacheStats stats = cache.stats();
        assertEquals(removalListener.size(), stats.evictionCount());
        assertEquals(computeCount.get(), stats.loadSuccessCount());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        for (RemovalNotification<String, String> notification : removalListener) {
          assertEquals("Invalid removal notification", notification.getKey(), notification.getValue());
        }
    
        CacheStats stats = cache.stats();
        assertEquals(removalListener.size(), stats.evictionCount());
        assertEquals(computeCount.get(), stats.loadSuccessCount());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25K bytes
    - Viewed (0)
Back to top