Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for recordStats (0.13 sec)

  1. guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

      public void testParse_recordStats() {
        CacheBuilderSpec spec = parse("recordStats");
        assertTrue(spec.recordStats);
        assertCacheBuilderEquivalence(CacheBuilder.newBuilder().recordStats(), CacheBuilder.from(spec));
      }
    
      public void testParse_recordStatsValueSpecified() {
        assertThrows(IllegalArgumentException.class, () -> parse("recordStats=True"));
      }
    
      public void testParse_recordStatsRepeated() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

        assertThat(popLoggedThrowable()).isInstanceOf(InvalidCacheLoadException.class);
      }
    
      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());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 86.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

      public void testParse_recordStats() {
        CacheBuilderSpec spec = parse("recordStats");
        assertTrue(spec.recordStats);
        assertCacheBuilderEquivalence(CacheBuilder.newBuilder().recordStats(), CacheBuilder.from(spec));
      }
    
      public void testParse_recordStatsValueSpecified() {
        assertThrows(IllegalArgumentException.class, () -> parse("recordStats=True"));
      }
    
      public void testParse_recordStatsRepeated() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

        return new LocalLoadingCache<>(builder, loader);
      }
    
      private CacheBuilder<Object, Object> createCacheBuilder() {
        return CacheBuilder.newBuilder().recordStats();
      }
    
      // constructor tests
    
      public void testComputingFunction() {
        CacheLoader<Object, Object> loader =
            new CacheLoader<Object, Object>() {
              @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

        return new LocalLoadingCache<>(builder, loader);
      }
    
      private CacheBuilder<Object, Object> createCacheBuilder() {
        return CacheBuilder.newBuilder().recordStats();
      }
    
      // constructor tests
    
      public void testComputingFunction() {
        CacheLoader<Object, Object> loader =
            new CacheLoader<Object, Object>() {
              @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

                  computeCount.incrementAndGet();
                  return key;
                }
              }
            };
        final LoadingCache<String, String> cache =
            CacheBuilder.newBuilder()
                .recordStats()
                .concurrencyLevel(2)
                .expireAfterWrite(100, MILLISECONDS)
                .removalListener(removalListener)
                .maximumSize(5000)
                .build(countingIdentityLoader);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

                .createTestSuite());
        suite.addTest(
            ConcurrentMapTestSuiteBuilder.using(
                    new TestStringCacheGenerator(createCacheBuilder().recordStats()))
                .named("LocalCache with recordStats")
                .withFeatures(
                    CollectionSize.ANY,
                    MapFeature.GENERAL_PURPOSE,
                    CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 110.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/LocalCacheTest.java

                .createTestSuite());
        suite.addTest(
            ConcurrentMapTestSuiteBuilder.using(
                    new TestStringCacheGenerator(createCacheBuilder().recordStats()))
                .named("LocalCache with recordStats")
                .withFeatures(
                    CollectionSize.ANY,
                    MapFeature.GENERAL_PURPOSE,
                    CollectionFeature.SUPPORTS_ITERATOR_REMOVE)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 112.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/cache/CacheBuilder.java

       *
       * @return this {@code CacheBuilder} instance (for chaining)
       * @since 12.0 (previously, stats collection was automatic)
       */
      @CanIgnoreReturnValue
      public CacheBuilder<K, V> recordStats() {
        statsCounterSupplier = CACHE_STATS_COUNTER;
        return this;
      }
    
      boolean isRecordingStats() {
        return statsCounterSupplier == CACHE_STATS_COUNTER;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 52K bytes
    - Viewed (0)
  10. guava/src/com/google/common/cache/CacheBuilder.java

       *
       * @return this {@code CacheBuilder} instance (for chaining)
       * @since 12.0 (previously, stats collection was automatic)
       */
      @CanIgnoreReturnValue
      public CacheBuilder<K, V> recordStats() {
        statsCounterSupplier = CACHE_STATS_COUNTER;
        return this;
      }
    
      boolean isRecordingStats() {
        return statsCounterSupplier == CACHE_STATS_COUNTER;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 51.6K bytes
    - Viewed (0)
Back to top