Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkAttrString (0.16 sec)

  1. src/log/slog/attr_test.go

    		d = Duration("key", d).Value.Duration()
    		x = Any("key", p).Value.Any()
    	}))
    	if a != 0 {
    		t.Errorf("got %d allocs, want zero", a)
    	}
    	_ = u
    	_ = f
    	_ = b
    	_ = s
    	_ = x
    }
    
    func BenchmarkAttrString(b *testing.B) {
    	var (
    		is string
    		u  string
    		f  string
    		bn string
    		s  string
    		x  string
    		ds string
    		p  = &is
    		d  time.Duration
    	)
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 18:23:25 UTC 2024
    - 1.4K bytes
    - Viewed (0)
Back to top