- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for testBytes (0.26 sec)
-
android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java
private static final int RANDOM_SEED = new Random().nextInt(); @Param({"10", "1000", "100000", "1000000"}) private int size; private byte[] testBytes; @BeforeExperiment void setUp() { testBytes = new byte[size]; new Random(RANDOM_SEED).nextBytes(testBytes); } // CRC32 @Benchmark byte crc32HashFunction(int reps) { return runHashFunction(reps, Hashing.crc32()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 16:53:43 UTC 2024 - 3.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java
private byte[] testBytes; @BeforeExperiment void setUp() { testBytes = new byte[size]; random.nextBytes(testBytes); } @Benchmark int hasher(int reps) { HashFunction hashFunction = hashFunctionEnum.getHashFunction(); int result = 37; for (int i = 0; i < reps; i++) { result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0]; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.3K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java
private static final int RANDOM_SEED = new Random().nextInt(); @Param({"10", "1000", "100000", "1000000"}) private int size; private byte[] testBytes; @BeforeExperiment void setUp() { testBytes = new byte[size]; new Random(RANDOM_SEED).nextBytes(testBytes); } // CRC32 @Benchmark byte crc32HashFunction(int reps) { return runHashFunction(reps, Hashing.crc32()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 16:53:43 UTC 2024 - 3.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/HashingInputStreamTest.java
byte[] buf = new byte[4]; int numOfByteRead = in.read(buf, 0, buf.length); assertEquals(4, numOfByteRead); for (int i = 0; i < testBytes.length; i++) { assertEquals(testBytes[i], buf[i]); } verify(hasher).putBytes(testBytes, 0, testBytes.length); verify(hashFunction).newHasher(); verifyNoMoreInteractions(hashFunction, hasher); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 02 16:24:50 UTC 2020 - 5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashingInputStreamTest.java
byte[] buf = new byte[4]; int numOfByteRead = in.read(buf, 0, buf.length); assertEquals(4, numOfByteRead); for (int i = 0; i < testBytes.length; i++) { assertEquals(testBytes[i], buf[i]); } verify(hasher).putBytes(testBytes, 0, testBytes.length); verify(hashFunction).newHasher(); verifyNoMoreInteractions(hashFunction, hasher); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 02 16:24:50 UTC 2020 - 5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
import java.util.Random; import junit.framework.TestCase; /** * Tests for AbstractByteHasher. * * @author Colin Decker */ public class AbstractByteHasherTest extends TestCase { public void testBytes() { TestHasher hasher = new TestHasher(); // byte order insignificant here byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8}; hasher.putByte((byte) 1); hasher.putBytes(new byte[] {2, 3, 4, 5, 6});
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 3.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
import java.util.Random; import junit.framework.TestCase; /** * Tests for AbstractByteHasher. * * @author Colin Decker */ public class AbstractByteHasherTest extends TestCase { public void testBytes() { TestHasher hasher = new TestHasher(); // byte order insignificant here byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8}; hasher.putByte((byte) 1); hasher.putBytes(new byte[] {2, 3, 4, 5, 6});
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 3.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
import java.util.Random; import junit.framework.TestCase; /** * Tests for AbstractStreamingHasher. * * @author Dimitris Andreou */ public class AbstractStreamingHasherTest extends TestCase { public void testBytes() { Sink sink = new Sink(4); // byte order insignificant here byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8}; sink.putByte((byte) 1); sink.putBytes(new byte[] {2, 3, 4, 5, 6}); sink.putByte((byte) 7);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 8.5K bytes - Viewed (0)