Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 75 for NewWriter (0.23 sec)

  1. cmd/storage-datatypes_gen_test.go

    	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()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeBaseOptions(b *testing.B) {
    	v := BaseOptions{}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 60.4K bytes
    - Viewed (0)
  2. cmd/bucket-replication-metrics_gen_test.go

    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func BenchmarkEncodeActiveWorkerStat(b *testing.B) {
    	v := ActiveWorkerStat{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeActiveWorkerStat(b *testing.B) {
    	v := ActiveWorkerStat{}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Feb 06 06:00:45 GMT 2024
    - 17.4K bytes
    - Viewed (0)
  3. src/archive/zip/writer_test.go

    	// write a zip file
    	archive := new(bytes.Buffer)
    	w := NewWriter(archive)
    
    	for i := range files {
    		f := &files[i]
    		f.crc32 = crc32.ChecksumIEEE(f.content)
    		size := uint64(len(f.content))
    		f.uncompressedSize = size
    		f.compressedSize = size
    
    		var compressedContent []byte
    		if f.method == Deflate {
    			var buf bytes.Buffer
    			w, err := flate.NewWriter(&buf, flate.BestSpeed)
    			if err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  4. cmd/bucket-replication-utils_gen_test.go

    	}
    }
    
    func BenchmarkEncodeBucketReplicationResyncStatus(b *testing.B) {
    	v := BucketReplicationResyncStatus{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeBucketReplicationResyncStatus(b *testing.B) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Aug 22 23:53:06 GMT 2022
    - 23K bytes
    - Viewed (0)
  5. internal/grid/msg_gen_test.go

    	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()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeconnectReq(b *testing.B) {
    	v := connectReq{}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 10.8K bytes
    - Viewed (0)
  6. cmd/data-usage-cache_gen_test.go

    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func BenchmarkEncodeallTierStats(b *testing.B) {
    	v := allTierStats{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeallTierStats(b *testing.B) {
    	v := allTierStats{}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Jan 13 07:51:08 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  7. cmd/batch-rotate_gen_test.go

    		t.Error(err)
    	}
    }
    
    func BenchmarkEncodeBatchJobKeyRotateEncryption(b *testing.B) {
    	v := BatchJobKeyRotateEncryption{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeBatchJobKeyRotateEncryption(b *testing.B) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Aug 29 18:27:23 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  8. cmd/batch-replicate_gen_test.go

    	}
    }
    
    func BenchmarkEncodeBatchJobReplicateCredentials(b *testing.B) {
    	v := BatchJobReplicateCredentials{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeBatchJobReplicateCredentials(b *testing.B) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Aug 29 18:27:23 GMT 2023
    - 14.2K bytes
    - Viewed (1)
  9. src/archive/tar/writer_test.go

    		}
    	})
    
    	t.Run("NegativeSize", func(t *testing.T) {
    		tw := NewWriter(new(bytes.Buffer))
    		hdr := &Header{Name: "small.txt", Size: -1}
    		if err := tw.WriteHeader(hdr); err == nil {
    			t.Fatalf("WriteHeader() = nil, want non-nil error")
    		}
    	})
    
    	t.Run("BeforeHeader", func(t *testing.T) {
    		tw := NewWriter(new(bytes.Buffer))
    		if _, err := tw.Write([]byte("Kilts")); err != ErrWriteTooLong {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
  10. cmd/batch-job-common-types_gen_test.go

    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func BenchmarkEncodeBatchJobKV(b *testing.B) {
    	v := BatchJobKV{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeBatchJobKV(b *testing.B) {
    	v := BatchJobKV{}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Dec 02 10:51:33 GMT 2023
    - 11.3K bytes
    - Viewed (0)
Back to top