Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 171 for miss (0.02 sec)

  1. tests/lru_test.go

    		trace[i] = getRand(b) % 32768
    	}
    
    	b.ResetTimer()
    
    	var hit, miss int
    	for i := 0; i < 2*b.N; i++ {
    		if i%2 == 0 {
    			l.Add(trace[i], trace[i])
    		} else {
    			if _, ok := l.Get(trace[i]); ok {
    				hit++
    			} else {
    				miss++
    			}
    		}
    	}
    	b.Logf("hit: %d miss: %d ratio: %f", hit, miss, float64(hit)/float64(hit+miss))
    }
    
    func BenchmarkLRU_Freq_NoExpire(b *testing.B) {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Mon Sep 08 09:19:22 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

            assertThat(cache.asMap().containsKey(entry.getKey())).isTrue();
            assertThat(cache.asMap().containsValue(entry.getValue())).isTrue();
            // this getUnchecked() call shouldn't be a cache miss; verified below
            assertThat(cache.getUnchecked(entry.getKey())).isEqualTo(entry.getValue());
          }
          assertThat(cache.stats().missCount()).isEqualTo(WARMUP_SIZE);
          checkValidState(cache);
        }
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 15.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

            assertThat(cache.asMap().containsKey(entry.getKey())).isTrue();
            assertThat(cache.asMap().containsValue(entry.getValue())).isTrue();
            // this getUnchecked() call shouldn't be a cache miss; verified below
            assertThat(cache.getUnchecked(entry.getKey())).isEqualTo(entry.getValue());
          }
          assertThat(cache.stats().missCount()).isEqualTo(WARMUP_SIZE);
          checkValidState(cache);
        }
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 15.7K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt

      private fun testRequestMethod(
        requestMethod: String,
        expectCached: Boolean,
        withOverride: Boolean = false,
      ) {
        // 1. Seed the cache (potentially).
        // 2. Expect a cache hit or miss.
        server.enqueue(
          MockResponse
            .Builder()
            .addHeader("Expires: " + formatDate(1, TimeUnit.HOURS))
            .addHeader("X-Response-ID: 1")
            .build(),
        )
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 03 17:41:45 UTC 2025
    - 116.8K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

            return cacheWritingResponse(cacheRequest, response).also {
              if (cacheResponse != null) {
                // This will log a conditional cache miss only.
                call.eventListener.cacheMiss(call)
              }
            }
          }
    
          if (HttpMethod.invalidatesCache(networkRequest.method)) {
            try {
              cache.remove(networkRequest)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            else -> JavaNetSocket(route.proxy)
          }
        this.rawSocket = rawSocket
    
        // Handle the race where cancel() precedes connectSocket(). We don't want to miss a cancel.
        if (canceled) {
          throw IOException("canceled")
        }
    
        rawSocket.soTimeout = socketReadTimeoutMillis
        try {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Oct 08 03:50:05 UTC 2025
    - 19.3K bytes
    - Viewed (2)
  7. android/guava/src/com/google/common/cache/CacheStats.java

        return (totalLoadCount == 0) ? 0.0 : (double) loadExceptionCount / totalLoadCount;
      }
    
      /**
       * Returns the total number of nanoseconds the cache has spent loading new values. This can be
       * used to calculate the miss penalty. This value is increased every time {@code loadSuccessCount}
       * or {@code loadExceptionCount} is incremented.
       */
      @SuppressWarnings("GoodTime") // should return a java.time.Duration
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  8. guava/src/com/google/common/cache/CacheStats.java

        return (totalLoadCount == 0) ? 0.0 : (double) loadExceptionCount / totalLoadCount;
      }
    
      /**
       * Returns the total number of nanoseconds the cache has spent loading new values. This can be
       * used to calculate the miss penalty. This value is increased every time {@code loadSuccessCount}
       * or {@code loadExceptionCount} is incremented.
       */
      @SuppressWarnings("GoodTime") // should return a java.time.Duration
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/AbstractFutureState.java

        abstract String atomicHelperTypeForTest();
      }
    
      /**
       * {@link AtomicHelper} based on {@link sun.misc.Unsafe}.
       *
       * <p>Static initialization of this class will fail if the {@link sun.misc.Unsafe} object cannot
       * be accessed.
       */
      @SuppressWarnings("SunApi") // b/345822163
      private static final class UnsafeAtomicHelper extends AtomicHelper {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 33.2K bytes
    - Viewed (0)
  10. guava/src/com/google/common/util/concurrent/AbstractFutureState.java

        @Override
        String atomicHelperTypeForTest() {
          return "VarHandleAtomicHelper";
        }
      }
    
      /**
       * {@link AtomicHelper} based on {@link sun.misc.Unsafe}.
       *
       * <p>Static initialization of this class will fail if the {@link sun.misc.Unsafe} object cannot
       * be accessed.
       */
      @SuppressWarnings("SunApi") // b/345822163
      private static final class UnsafeAtomicHelper extends AtomicHelper {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 34.8K bytes
    - Viewed (0)
Back to top