- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 433 for runcom (0.18 sec)
-
android/guava-tests/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java
} return root; } }, RANDOM { /** * Generates a tree with topology selected uniformly at random from the topologies of binary * trees of the specified size. */ @Override Optional<BinaryNode> createTree(int size, Random rng) { int[] keys = new int[size]; for (int i = 0; i < size; i++) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 26 19:18:53 GMT 2019 - 4.9K bytes - Viewed (0) -
internal/crypto/key.go
type ObjectKey [32]byte // GenerateKey generates a unique ObjectKey from a 256 bit external key // and a source of randomness. If random is nil the default PRNG of the // system (crypto/rand) is used. func GenerateKey(extKey []byte, random io.Reader) (key ObjectKey) { if random == nil { random = rand.Reader } if len(extKey) != 32 { // safety check logger.CriticalIf(context.Background(), errors.New("crypto: invalid key length"))
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Tue Mar 19 20:28:10 GMT 2024 - 6.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java
import com.google.caliper.Benchmark; import java.util.Random; /** * Benchmarks for certain methods of {@code UnsignedLongs}. * * @author Eamonn McManus */ public class UnsignedLongsBenchmark { private static final int ARRAY_SIZE = 0x10000; private static final int ARRAY_MASK = 0x0ffff; private static final Random RANDOM_SOURCE = new Random(314159265358979L);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java
} private static final Random RANDOM = new Random(42); public void testLength() { assertThat(ImmutableDoubleArray.of().length()).isEqualTo(0); assertThat(ImmutableDoubleArray.of(0).length()).isEqualTo(1); assertThat(ImmutableDoubleArray.of(0, 1, 3).length()).isEqualTo(3); assertThat(ImmutableDoubleArray.of(0, 1, 3).subArray(1, 1).length()).isEqualTo(0);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Jun 01 09:32:35 GMT 2023 - 21.3K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/HashMultisetAddPresentBenchmark.java
int[] queries = new int[ARRAY_SIZE]; @BeforeExperiment void setUp() { Random random = new Random(); multisets.clear(); for (int i = 0; i < ARRAY_SIZE; i++) { HashMultiset<Integer> multiset = HashMultiset.<Integer>create(); multisets.add(multiset); queries[i] = random.nextInt(); multiset.add(queries[i]); } } @Benchmark int add(int reps) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 1.6K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java
total += future.get(); } return total; } private long runAddSingleThread(int reps) { Random random = new Random(); int nKeys = keys.size(); long blah = 0; for (int i = 0; i < reps; i++) { Integer key = keys.get(random.nextInt(nKeys)); int delta = random.nextInt(5); blah += delta; multiset.add(key, delta); } return blah; }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed May 09 15:17:25 GMT 2018 - 16.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/ImmutableLongArrayTest.java
} private static final Random RANDOM = new Random(42); public void testLength() { assertThat(ImmutableLongArray.of().length()).isEqualTo(0); assertThat(ImmutableLongArray.of(0).length()).isEqualTo(1); assertThat(ImmutableLongArray.of(0, 1, 3).length()).isEqualTo(3); assertThat(ImmutableLongArray.of(0, 1, 3).subArray(1, 1).length()).isEqualTo(0);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Jun 01 09:32:35 GMT 2023 - 19K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
sink.assertBytes(new byte[] {1, 2, 0, 0}); // padded with zeros } public void testString() { Random random = new Random(); for (int i = 0; i < 100; i++) { byte[] bytes = new byte[64]; random.nextBytes(bytes); String s = new String(bytes, UTF_16LE); // so all random strings are valid assertEquals( new Sink(4).putUnencodedChars(s).hash(),
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 8.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java
private Queue<Integer> queue; private final Random random = new Random(); @BeforeExperiment void setUp() { queue = heap.create(comparator.get()); for (int i = 0; i < size; i++) { queue.add(random.nextInt()); } } @Benchmark void pollAndAdd(int reps) { for (int i = 0; i < reps; i++) { // TODO(kevinb): precompute random #s? queue.add(queue.poll() ^ random.nextInt());
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Apr 19 19:24:36 GMT 2023 - 4.3K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/base/WhitespaceMatcherBenchmark.java
return new String(result); } private static String newTestString(Random random, BitSet bitSet, int percentMatching) { final String allMatchingChars = allMatchingChars(bitSet); final char[] result = new char[STRING_LENGTH]; // Fill with matching chars. for (int i = 0; i < result.length; i++) { result[i] = allMatchingChars.charAt(random.nextInt(allMatchingChars.length())); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed May 16 22:49:59 GMT 2018 - 3.9K bytes - Viewed (0)