Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 88 for mybytes (0.11 sec)

  1. android/guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java

          result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0];
        }
        return result;
      }
    
      @Benchmark
      int hashFunction(int reps) {
        HashFunction hashFunction = hashFunctionEnum.getHashFunction();
        int result = 37;
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
        }
        return result;
      }
    
      @Benchmark
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.3K bytes
    - Viewed (0)
  2. testing/internal-performance-testing/src/main/groovy/org/gradle/performance/measure/DataAmount.java

        public static Amount<DataAmount> bytes(BigDecimal value) {
            return Amount.valueOf(value, BYTES);
        }
    
        public static Amount<DataAmount> kbytes(BigDecimal value) {
            return Amount.valueOf(value, KILO_BYTES);
        }
    
        public static Amount<DataAmount> mbytes(BigDecimal value) {
            return Amount.valueOf(value, MEGA_BYTES);
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/HashCodeTest.java

        byte[] original = hash.asBytes();
        byte[] mutated = hash.asBytes();
        mutated[0]++;
        assertTrue(Arrays.equals(original, hash.asBytes()));
      }
    
      private static void assertReadableBytes(HashCode hashCode) {
        assertTrue(hashCode.bits() >= 32); // sanity
        byte[] hashBytes = hashCode.asBytes();
        int totalBytes = hashCode.bits() / 8;
    
        for (int bytes = 0; bytes < totalBytes; bytes++) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 13.1K bytes
    - Viewed (0)
  4. src/runtime/tracetype.go

    	// The maximum number of bytes required to hold the encoded type.
    	maxBytes := 1 + 5*traceBytesPerNumber + len(typName)
    
    	// Estimate the size of this record. This
    	// bound is pretty loose, but avoids counting
    	// lots of varint sizes.
    	//
    	// Add 1 because we might also write a traceAllocFreeTypesBatch byte.
    	var flushed bool
    	w, flushed = w.ensure(1 + maxBytes)
    	if flushed {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:31:27 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/allocator_test.go

    )
    
    func TestAllocatorRandomInputs(t *testing.T) {
    	maxBytes := 5 * 1000000 // 5 MB
    	iterations := rand.Intn(10000) + 10
    	target := &Allocator{}
    
    	for i := 0; i < iterations; i++ {
    		bytesToAllocate := rand.Intn(maxBytes)
    		buff := target.Allocate(uint64(bytesToAllocate))
    		if cap(buff) < bytesToAllocate {
    			t.Fatalf("expected the buffer to allocate: %v bytes whereas it allocated: %v bytes", bytesToAllocate, cap(buff))
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 13:38:29 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  6. cmd/sftp-server_test.go

    			},
    		)
    	}
    }
    
    func (s *TestSuiteIAM) SFTPFailedPublicKeyAuthenticationInvalidKey(c *check) {
    	keyBytes, err := os.ReadFile("./testdata/invalid_test_key.pub")
    	if err != nil {
    		c.Fatalf("could not read test key file: %s", err)
    	}
    
    	testKey, _, _, _, err := ssh.ParseAuthorizedKey(keyBytes)
    	if err != nil {
    		c.Fatalf("could not parse test key file: %s", err)
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 07:51:13 UTC 2024
    - 8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go

    			if n == 0 {
    				return nil, nil, fmt.Errorf("got short buffer with n=0, base=%d, cap=%d", base, cap(d.buf))
    			}
    			if d.resetRead {
    				continue
    			}
    			// double the buffer size up to maxBytes
    			if len(d.buf) < d.maxBytes {
    				base += n
    				d.buf = append(d.buf, make([]byte, len(d.buf))...)
    				continue
    			}
    			// must read the rest of the frame (until we stop getting ErrShortBuffer)
    			d.resetRead = true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 25 14:51:36 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

        // Trick the JVM to prevent it from using the hash function non-polymorphically
        result ^= Hashing.crc32().hashInt(reps).asBytes()[0];
        result ^= Hashing.adler32().hashInt(reps).asBytes()[0];
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
        }
        return result;
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 13 16:19:15 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/smb2/create/Smb2CreateRequest.java

                    dstIndex += 4;
    
                    SMBUtil.writeInt2(dstIndex - structStart, dst, cnOffsetOffset);
                    System.arraycopy(cnBytes, 0, dst, dstIndex, cnBytes.length);
                    dstIndex += cnBytes.length;
                    dstIndex += pad8(dstIndex);
    
                    SMBUtil.writeInt2(dstIndex - structStart, dst, dataOffsetOffset);
    Registered: Wed Jun 12 15:45:55 UTC 2024
    - Last Modified: Sat Jun 01 09:52:11 UTC 2019
    - 14.3K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/testsanitizers/testdata/libfuzzer2.go

    package main
    
    import "C"
    
    import "unsafe"
    
    //export FuzzMe
    func FuzzMe(p unsafe.Pointer, sz C.int) {
    	b := C.GoBytes(p, sz)
    	b = b[3:]
    	if len(b) >= 4 && b[0] == 'f' && b[1] == 'u' && b[2] == 'z' && b[3] == 'z' {
    		panic("found it")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 254 bytes
    - Viewed (0)
Back to top