Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 238 for Measure (0.15 sec)

  1. android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java

       * calling thread wait for that time.
       *
       * The simplest way to maintain a rate of QPS is to keep the timestamp of the last granted
       * request, and ensure that (1/QPS) seconds have elapsed since then. For example, for a rate of
       * QPS=5 (5 tokens per second), if we ensure that a request isn't granted earlier than 200ms after
       * the last one, then we achieve the intended rate. If a request comes and the last request was
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 19.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/HashTestUtils.java

              if ((hash1 & (1 << k)) == (hash2 & (1 << k))) {
                same[k] += 1;
              } else {
                diff[k] += 1;
              }
            }
          }
          // measure probability and assert it's within margin of error
          for (int j = 0; j < hashBits; j++) {
            double prob = (double) diff[j] / (double) (diff[j] + same[j]);
            Assert.assertEquals(0.50d, prob, epsilon);
          }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/LittleEndianByteArray.java

       * @param offset the offset into the array at which to start
       * @return the value found in the array in the form of a long
       */
      static int load32(byte[] source, int offset) {
        // TODO(user): Measure the benefit of delegating this to LittleEndianBytes also.
        return (source[offset] & 0xFF)
            | ((source[offset + 1] & 0xFF) << 8)
            | ((source[offset + 2] & 0xFF) << 16)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/collect/MapsMemoryBenchmark.java

      /**
       * A map of contents pre-created before experiment starts to only measure map creation cost. The
       * implementation for the creation of contents is independent and could be different from that of
       * the map under test.
       */
      Map<Element, Element> contents;
    
      /** Map pre-created before experiment starts to only measure iteration cost during experiment. */
      Map<Element, Element> map;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Dec 20 15:07:46 GMT 2019
    - 3.4K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/collect/testing/features/FeatureEnumTest.java

              annotationClass.getDeclaringClass(),
              returnType.getComponentType());
        }
      }
    
      // This is public so that tests for Feature enums we haven't yet imagined
      // can reuse it.
      public static <E extends Enum<?> & Feature<?>> void assertGoodFeatureEnum(
          Class<E> featureEnumClass) {
        final Class<?>[] classes = featureEnumClass.getDeclaredClasses();
        for (Class<?> containedClass : classes) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.4K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/features/TesterRequirements.java

     *
     * @author George van den Driessche
     */
    @GwtCompatible
    public final class TesterRequirements {
      private final Set<Feature<?>> presentFeatures;
      private final Set<Feature<?>> absentFeatures;
    
      public TesterRequirements(Set<Feature<?>> presentFeatures, Set<Feature<?>> absentFeatures) {
        this.presentFeatures = Helpers.copyToSet(presentFeatures);
        this.absentFeatures = Helpers.copyToSet(absentFeatures);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 20 11:19:03 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetFeature.java

    @SuppressWarnings("rawtypes") // maybe avoidable if we rework the whole package?
    @GwtCompatible
    public enum MultisetFeature implements Feature<Multiset> {
      /**
       * Indicates that elements from {@code Multiset.entrySet()} update to reflect changes in the
       * backing multiset.
       */
      ENTRIES_ARE_VIEWS;
    
      @Override
      public Set<Feature<? super Multiset>> getImpliedFeatures() {
        return Collections.emptySet();
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/SetTestSuiteBuilder.java

        }
    
        @Override
        public Iterable<E> order(List<E> insertionOrder) {
          return gen.order(insertionOrder);
        }
      }
    
      private static Set<Feature<?>> computeReserializedCollectionFeatures(Set<Feature<?>> features) {
        Set<Feature<?>> derivedFeatures = new HashSet<>(features);
        derivedFeatures.remove(SERIALIZABLE);
        derivedFeatures.remove(SERIALIZABLE_INCLUDING_VIEWS);
        return derivedFeatures;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/ListTestSuiteBuilder.java

        }
    
        @Override
        public Iterable<E> order(List<E> insertionOrder) {
          return gen.order(insertionOrder);
        }
      }
    
      private static Set<Feature<?>> computeReserializedCollectionFeatures(Set<Feature<?>> features) {
        Set<Feature<?>> derivedFeatures = new HashSet<>(features);
        derivedFeatures.remove(SERIALIZABLE);
        derivedFeatures.remove(SERIALIZABLE_INCLUDING_VIEWS);
        return derivedFeatures;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/CompactHashSetTest.java

     */
    @GwtIncompatible // java.util.Arrays#copyOf(Object[], int), java.lang.reflect.Array
    public class CompactHashSetTest extends TestCase {
      public static Test suite() {
        List<Feature<?>> allFeatures =
            Arrays.<Feature<?>>asList(
                CollectionSize.ANY,
                CollectionFeature.ALLOWS_NULL_VALUES,
                CollectionFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 4K bytes
    - Viewed (0)
Back to top