Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkIntAdd (0.45 sec)

  1. src/expvar/expvar_test.go

    	}
    
    	if s := reqs.String(); s != "4" {
    		t.Errorf("reqs.String() = %q, want \"4\"", s)
    	}
    
    	reqs.Set(-2)
    	if i := reqs.Value(); i != -2 {
    		t.Errorf("reqs.Value() = %v, want -2", i)
    	}
    }
    
    func BenchmarkIntAdd(b *testing.B) {
    	var v Int
    
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			v.Add(1)
    		}
    	})
    }
    
    func BenchmarkIntSet(b *testing.B) {
    	var v Int
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:46:19 UTC 2024
    - 13.4K bytes
    - Viewed (0)
Back to top