Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ReportAllocs (0.11 sec)

  1. cmd/storage-datatypes_gen_test.go

    func BenchmarkMarshalMsgBaseOptions(b *testing.B) {
    	v := BaseOptions{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgBaseOptions(b *testing.B) {
    	v := BaseOptions{}
    	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++ {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Mon Aug 12 08:38:15 UTC 2024
    - 73.9K bytes
    - Viewed (0)
  2. src/bufio/bufio_test.go

    	r := strings.NewReader("       foo       foo        42        42        42        42        42        42        42        42       4.2       4.2       4.2       4.2\n")
    	buf := NewReader(r)
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    		r.Seek(0, io.SeekStart)
    		buf.Reset(r)
    
    		_, err := buf.ReadString('\n')
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    }
    
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Fri Feb 07 01:08:54 UTC 2025
    - 51.6K bytes
    - Viewed (0)
  3. src/bytes/bytes_test.go

    		desc := fmt.Sprintf("%q %q %q %d", tt.in, tt.old, tt.new, tt.n)
    		var (
    			in  = []byte(tt.in)
    			old = []byte(tt.old)
    			new = []byte(tt.new)
    		)
    		b.Run(desc, func(b *testing.B) {
    			b.ReportAllocs()
    			for b.Loop() {
    				Replace(in, old, new, tt.n)
    			}
    		})
    	}
    }
    
    type TitleTest struct {
    	in, out string
    }
    
    var TitleTests = []TitleTest{
    	{"", ""},
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Mon Jul 28 18:13:58 UTC 2025
    - 62.9K bytes
    - Viewed (0)
Back to top