Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 208 for newHeader (0.08 sec)

  1. internal/s3select/jstream/scanner_test.go

    		}
    	})
    	b.Run("large", func(b *testing.B) {
    		for i := 0; i < b.N; i++ {
    			benchmarkBufioReader(largeInput)
    		}
    	})
    }
    
    func benchmarkBufioReader(b []byte) {
    	br := bufio.NewReader(bytes.NewReader(b))
    loop:
    	for {
    		_, err := br.ReadByte()
    		switch err {
    		case nil:
    			continue loop
    		case io.EOF:
    			break loop
    		default:
    			panic(err)
    		}
    	}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. internal/s3select/select.go

    			if simdjson.SupportedCPU() {
    				s3Select.recordReader = simdj.NewReader(s3Select.progressReader, &s3Select.Input.JSONArgs)
    			} else {
    				s3Select.recordReader = json.NewPReader(s3Select.progressReader, &s3Select.Input.JSONArgs)
    			}
    		} else {
    			// Document mode.
    			s3Select.recordReader = json.NewReader(s3Select.progressReader, &s3Select.Input.JSONArgs)
    		}
    
    		return nil
    	case parquetFormat:
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 22 00:33:43 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  3. cmd/site-replication-metrics_gen_test.go

    		t.Log("WARNING: TestEncodeDecodeRStat Msgsize() is inaccurate")
    	}
    
    	vn := RStat{}
    	err := msgp.Decode(&buf, &vn)
    	if err != nil {
    		t.Error(err)
    	}
    
    	buf.Reset()
    	msgp.Encode(&buf, &v)
    	err = msgp.NewReader(&buf).Skip()
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func BenchmarkEncodeRStat(b *testing.B) {
    	v := RStat{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 30 08:00:59 UTC 2023
    - 12.9K bytes
    - Viewed (0)
  4. internal/grid/msg_gen_test.go

    	}
    
    	vn := connectReq{}
    	err := msgp.Decode(&buf, &vn)
    	if err != nil {
    		t.Error(err)
    	}
    
    	buf.Reset()
    	msgp.Encode(&buf, &v)
    	err = msgp.NewReader(&buf).Skip()
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func BenchmarkEncodeconnectReq(b *testing.B) {
    	v := connectReq{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jul 25 21:07:21 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  5. src/bufio/example_test.go

    func ExampleWriter_ReadFrom() {
    	var buf bytes.Buffer
    	writer := bufio.NewWriter(&buf)
    
    	data := "Hello, world!\nThis is a ReadFrom example."
    	reader := strings.NewReader(data)
    
    	n, err := writer.ReadFrom(reader)
    	if err != nil {
    		fmt.Println("ReadFrom Error:", err)
    		return
    	}
    
    	if err = writer.Flush(); err != nil {
    		fmt.Println("Flush Error:", err)
    		return
    	}
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  6. internal/hash/reader.go

    }
    
    // NewReaderWithOpts is like NewReader but takes `Options` as argument, allowing
    // callers to indicate if they want to disable md5sum checksum.
    func NewReaderWithOpts(ctx context.Context, src io.Reader, opts Options) (*Reader, error) {
    	// return hard limited reader
    	return newReader(ctx, src, opts.Size, opts.MD5Hex, opts.SHA256Hex, opts.ActualSize, opts.DisableMD5, opts.ForceMD5)
    }
    
    // NewReader returns a new Reader that wraps src and computes
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 19 12:59:07 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  7. cmd/storage-datatypes_gen_test.go

    	}
    
    	vn := BaseOptions{}
    	err := msgp.Decode(&buf, &vn)
    	if err != nil {
    		t.Error(err)
    	}
    
    	buf.Reset()
    	msgp.Encode(&buf, &v)
    	err = msgp.NewReader(&buf).Skip()
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func BenchmarkEncodeBaseOptions(b *testing.B) {
    	v := BaseOptions{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Aug 12 08:38:15 UTC 2024
    - 73.9K bytes
    - Viewed (0)
  8. src/archive/tar/reader_test.go

    			switch j {
    			case 0:
    				tr = NewReader(&reader{strings.NewReader(v.input)})
    				s1, s2 = "io.Reader", "auto"
    			case 1:
    				tr = NewReader(&reader{strings.NewReader(v.input)})
    				s1, s2 = "io.Reader", "manual"
    			case 2:
    				tr = NewReader(&readSeeker{strings.NewReader(v.input)})
    				s1, s2 = "io.ReadSeeker", "auto"
    			case 3:
    				tr = NewReader(&readSeeker{strings.NewReader(v.input)})
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 03 15:48:09 UTC 2024
    - 46.9K bytes
    - Viewed (0)
  9. cmd/streaming-signature-v4_test.go

    		chunkSignature []byte
    	}
    	// List of readers used.
    	readers := []io.Reader{
    		// Test - 1
    		bytes.NewReader([]byte("1000;chunk-signature=111123333333333333334444211\r\n")),
    		// Test - 2
    		bytes.NewReader([]byte("1000;")),
    		// Test - 3
    		bytes.NewReader([]byte(fmt.Sprintf("%4097d", 1))),
    		// Test - 4
    		bytes.NewReader([]byte("1000;chunk-signature=111123333333333333334444211\r\n")),
    	}
    	testCases := []testCase{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 5.7K bytes
    - Viewed (0)
  10. cmd/erasure-object_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	// PutObjectPart should succeed even if part already exists. ref: https://github.com/minio/minio/issues/1930
    	_, err = objLayer.PutObjectPart(ctx, "bucket1", "mpartObj1", res.UploadID, 1, mustGetPutObjReader(t, bytes.NewReader(fiveMBBytes), 5*humanize.MiByte, md5Hex, ""), opts)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 36.8K bytes
    - Viewed (0)
Back to top