Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for max_bytes (0.38 sec)

  1. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/locklistener/FileLockPacketPayload.java

    import java.io.EOFException;
    import java.io.IOException;
    
    import static org.gradle.cache.internal.locklistener.FileLockPacketType.UNKNOWN;
    
    public class FileLockPacketPayload {
    
        public static final int MAX_BYTES = 1 + 8 + 1; // protocolVersion + lockId + type
        private static final byte PROTOCOL_VERSION = 1;
        private static final ImmutableList<FileLockPacketType> TYPES = ImmutableList.copyOf(FileLockPacketType.values());
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  2. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/locklistener/FileLockPacketPayloadTest.groovy

        def "encodes lock id and type"() {
            when:
            def bytes = FileLockPacketPayload.encode(42, LOCK_RELEASE_CONFIRMATION)
    
            then:
            bytes.length == FileLockPacketPayload.MAX_BYTES
            bytes == [1, 0, 0, 0, 0, 0, 0, 0, 42, 3] as byte[]
        }
    
        def "decodes payloads without type"() {
            when:
            def payload = FileLockPacketPayload.decode([1, 0, 0, 0, 0, 0, 0, 0, 42, 1] as byte[], 9)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

        max_bytes = static_cast<size_t>(value * 1024 * 1024);
      }
      const char* max_staleness_env = std::getenv(kMaxStaleness);
      if (max_staleness_env && absl::SimpleAtoi(max_staleness_env, &value)) {
        max_staleness = value;
      }
      TF_VLog(1, "GCS cache max size = %u ; block size = %u ; max staleness = %u",
              max_bytes, block_size, max_staleness);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 23 06:55:53 UTC 2023
    - 46.9K bytes
    - Viewed (0)
  4. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/locklistener/FileLockCommunicator.java

            }
            return pingSentSuccessfully;
        }
    
        public DatagramPacket receive() throws GracefullyStoppedException {
            try {
                byte[] bytes = new byte[FileLockPacketPayload.MAX_BYTES];
                DatagramPacket packet = new DatagramPacket(bytes, bytes.length);
                socket.receive(packet);
                return packet;
            } catch (IOException e) {
                if (!stopped) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:49 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  5. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

        EXPECT_EQ(got_n, want_n);
        calls++;
        memset(buffer, 'x', got_n);
        TF_SetStatus(status, TF_OK, "");
        return got_n;
      };
      // If block_size, max_bytes, or both are zero, or want_n is larger than
      // max_bytes the cache is a pass-through.
      tf_gcs_filesystem::RamFileBlockCache cache1(1, 0, 0, fetcher);
      tf_gcs_filesystem::RamFileBlockCache cache2(0, 1, 0, fetcher);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Oct 15 03:16:57 UTC 2021
    - 23.2K bytes
    - Viewed (0)
  6. cmd/prune-junit-xml/prunexml.go

    					testcase.SkipMessage.Message = head + "[...clipped...]" + tail
    				}
    			}
    			if testcase.Failure != nil {
    				if len(testcase.Failure.Contents) > maxBytes {
    					fmt.Printf("clipping failure message in test case : %s\n", testcase.Name)
    					head := testcase.Failure.Contents[:maxBytes/2]
    					tail := testcase.Failure.Contents[len(testcase.Failure.Contents)-maxBytes/2:]
    					testcase.Failure.Contents = head + "[...clipped...]" + tail
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 06 12:26:00 UTC 2023
    - 4.4K 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. 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 {
    		// Annotate the batch as containing types.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:31:27 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/allocator_test.go

    */
    
    package runtime
    
    import (
    	"math/rand"
    	"testing"
    )
    
    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 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 13:38:29 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  10. src/go/internal/gcimporter/iimport.go

    	case types.Int32, types.Uint32:
    		maxBytes = 4
    	default:
    		maxBytes = 8
    	}
    
    	return
    }
    
    func (r *importReader) mpint(x *big.Int, typ *types.Basic) {
    	signed, maxBytes := intSize(typ)
    
    	maxSmall := 256 - maxBytes
    	if signed {
    		maxSmall = 256 - 2*maxBytes
    	}
    	if maxBytes == 1 {
    		maxSmall = 256
    	}
    
    	n, _ := r.declReader.ReadByte()
    	if uint(n) < maxSmall {
    		v := int64(n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
Back to top