Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for SetBytes (0.26 sec)

  1. cmd/bucket-stats_gen_test.go

    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    func BenchmarkUnmarshalBucketReplicationStat(b *testing.B) {
    	v := BucketReplicationStat{}
    	bts, _ := v.MarshalMsg(nil)
    	b.ReportAllocs()
    	b.SetBytes(int64(len(bts)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Aug 30 08:00:59 GMT 2023
    - 20.5K bytes
    - Viewed (0)
  2. cmd/erasure-server-pool-rebalance_gen_test.go

    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    func BenchmarkUnmarshalrebalanceInfo(b *testing.B) {
    	v := rebalanceInfo{}
    	bts, _ := v.MarshalMsg(nil)
    	b.ReportAllocs()
    	b.SetBytes(int64(len(bts)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Oct 25 19:36:57 GMT 2022
    - 11K bytes
    - Viewed (0)
  3. cmd/batch-handlers_gen_test.go

    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    func BenchmarkUnmarshalBatchJobRequest(b *testing.B) {
    	v := BatchJobRequest{}
    	bts, _ := v.MarshalMsg(nil)
    	b.ReportAllocs()
    	b.SetBytes(int64(len(bts)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Aug 29 18:27:23 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  4. src/bytes/compare_test.go

    			b.Fatal("b1 != b2")
    		}
    	}
    	b.SetBytes(int64(len(b1)))
    }
    
    func BenchmarkCompareBytesBigIdentical(b *testing.B) {
    	b.StopTimer()
    	b1 := make([]byte, 0, 1<<20)
    	for len(b1) < 1<<20 {
    		b1 = append(b1, "Hello Gophers!"...)
    	}
    	b2 := b1
    	b.StartTimer()
    	for i := 0; i < b.N; i++ {
    		if Compare(b1, b2) != 0 {
    			b.Fatal("b1 != b2")
    		}
    	}
    	b.SetBytes(int64(len(b1)))
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Jul 13 23:11:42 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  5. internal/s3select/json/preader_test.go

    		b.Fatal(err)
    	}
    	for _, file := range files {
    		b.Run(file.Name(), func(b *testing.B) {
    			f, err := os.ReadFile(filepath.Join("testdata", file.Name()))
    			if err != nil {
    				b.Fatal(err)
    			}
    			b.SetBytes(int64(len(f)))
    			b.ReportAllocs()
    			b.ResetTimer()
    			var record sql.Record
    			for i := 0; i < b.N; i++ {
    				r := NewPReader(io.NopCloser(bytes.NewBuffer(f)), &ReaderArgs{})
    				for {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 2.5K bytes
    - Viewed (0)
  6. cmd/xl-storage-format-v2_test.go

    	}
    
    	b.Run("requested-none", func(b *testing.B) {
    		b.ReportAllocs()
    		b.ResetTimer()
    		b.SetBytes(855) // number of versions...
    		for i := 0; i < b.N; i++ {
    			mergeXLV2Versions(8, false, 0, vers...)
    		}
    	})
    
    	b.Run("requested-v1", func(b *testing.B) {
    		b.ReportAllocs()
    		b.ResetTimer()
    		b.SetBytes(855) // number of versions...
    		for i := 0; i < b.N; i++ {
    			mergeXLV2Versions(8, false, 1, vers...)
    		}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 08 17:50:48 GMT 2024
    - 36.4K bytes
    - Viewed (0)
  7. cmd/batch-job-common-types_gen_test.go

    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    func BenchmarkUnmarshalBatchJobKV(b *testing.B) {
    	v := BatchJobKV{}
    	bts, _ := v.MarshalMsg(nil)
    	b.ReportAllocs()
    	b.SetBytes(int64(len(bts)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    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)
  8. misc/cgo/gmp/gmp.go

    }
    
    // Set sets z = x and returns z.
    func (z *Int) Set(x *Int) *Int {
    	z.doinit()
    	C.mpz_set(&z.i[0], &x.i[0])
    	return z
    }
    
    // SetBytes interprets b as the bytes of a big-endian integer
    // and sets z to that value.
    func (z *Int) SetBytes(b []byte) *Int {
    	z.doinit()
    	if len(b) == 0 {
    		z.SetInt64(0)
    	} else {
    		C.mpz_import(&z.i[0], C.size_t(len(b)), 1, 1, 1, 0, unsafe.Pointer(&b[0]))
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
  9. cmd/storage-datatypes_gen_test.go

    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    func BenchmarkUnmarshalBaseOptions(b *testing.B) {
    	v := BaseOptions{}
    	bts, _ := v.MarshalMsg(nil)
    	b.ReportAllocs()
    	b.SetBytes(int64(len(bts)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    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)
  10. cmd/local-locker_gen_test.go

    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    func BenchmarkUnmarshallocalLockMap(b *testing.B) {
    	v := localLockMap{}
    	bts, _ := v.MarshalMsg(nil)
    	b.ReportAllocs()
    	b.SetBytes(int64(len(bts)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 6.7K bytes
    - Viewed (0)
Back to top