- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 334 for randomOp (0.1 sec)
-
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) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java
import java.util.Map; import java.util.Random; import java.util.Set; import junit.framework.TestCase; /** * Tests for {@link AtomicLongMap}. * * @author mike nonemacher */ @GwtCompatible(emulated = true) public class AtomicLongMapTest extends TestCase { private static final int ITERATIONS = 100; private static final int MAX_ADDEND = 100; private final Random random = new Random(301); @J2ktIncompatible
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 13 14:28:25 UTC 2024 - 17.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java
* * @author mike nonemacher */ @J2ktIncompatible // threads @GwtIncompatible // threads public class AtomicLongMapBasherTest extends TestCase { private final Random random = new Random(301); public void testModify_basher() throws Exception { int nTasks = 3000; int nThreads = 100; final int getsPerTask = 1000; final int deltaRange = 10000; final String key = "key";
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 13 14:28:25 UTC 2024 - 4.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTester.java
if (slice && bytes.length > 0) { // test a random slice() of the ByteSource Random random = new Random(); byte[] expected = factory.getExpected(bytes); // if expected.length == 0, off has to be 0 but length doesn't matter--result will be empty int off = expected.length == 0 ? 0 : random.nextInt(expected.length); int len = expected.length == 0 ? 4 : random.nextInt(expected.length - off);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 8.6K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/SetCreationBenchmark.java
// "" means no fixed seed @Param("1234") private SpecialRandom random; @Param({"ImmutableSetImpl", "HashSetImpl"}) private SetImpl impl; // the following must be set during setUp private CollectionBenchmarkSampleData sampleData; @BeforeExperiment void setUp() { sampleData = new CollectionBenchmarkSampleData(true, random, 0.8, size); } @Benchmark int creation(int reps) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.8K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java
} } }, RANDOM { @Override void arrange(List<Integer> list) {} }; abstract void arrange(List<Integer> list); } private ImmutableList<Integer> input; @BeforeExperiment void setUp() { checkArgument(size > 0, "empty collection not supported"); Set<Integer> set = new LinkedHashSet<>(size); Random random = new Random();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3.5K 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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.3K bytes - Viewed (0) -
internal/kms/secret-key.go
} associatedData, err := req.AssociatedData.MarshalText() if err != nil { return DEK{}, err } const randSize = 28 random, err := sioutil.Random(randSize) if err != nil { return DEK{}, err } iv, nonce := random[:16], random[16:] prf := hmac.New(sha256.New, s.key) prf.Write(iv) key := prf.Sum(make([]byte, 0, prf.Size())) block, err := aes.NewCipher(key)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Aug 18 06:43:03 UTC 2024 - 8.3K bytes - Viewed (0) -
cmd/server_test.go
var buffer bytes.Buffer // data to be written into buffer. data := "1234567890" // seed the random number generator once. rand.Seed(3) // generate a random number between 13 and 200. randInt := getRandomRange(13, 200, -1) // write into buffer till length of the buffer is greater than the generated random number. for i := 0; i <= randInt; i += 10 { buffer.WriteString(data) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 15 16:28:02 UTC 2024 - 116.3K bytes - Viewed (0) -
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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.3K bytes - Viewed (0)