Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkTypeFieldsCache (0.2 sec)

  1. src/encoding/json/bench_test.go

    	b.RunParallel(func(pb *testing.PB) {
    		var s struct{}
    		for pb.Next() {
    			if err := Unmarshal(j, &s); err != nil {
    				b.Fatalf("Unmarshal error: %v", err)
    			}
    		}
    	})
    }
    
    func BenchmarkTypeFieldsCache(b *testing.B) {
    	b.ReportAllocs()
    	var maxTypes int = 1e6
    	if testenv.Builder() != "" {
    		maxTypes = 1e3 // restrict cache sizes on builders
    	}
    
    	// Dynamically generate many new types.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:00:17 UTC 2024
    - 12.5K bytes
    - Viewed (0)
Back to top