Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkCounter (0.18 sec)

  1. pkg/monitoring/monitoring_test.go

    	var nv string
    	for _, tag := range tags {
    		if tag.Key() == name {
    			nv = tag.Value()
    			break
    		}
    	}
    	hookSum.With(name.Value(nv)).Record(value)
    }
    
    func BenchmarkCounter(b *testing.B) {
    	monitortest.New(b)
    	b.Run("no labels", func(b *testing.B) {
    		for n := 0; n < b.N; n++ {
    			testSum.Increment()
    		}
    	})
    	b.Run("dynamic labels", func(b *testing.B) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Sep 13 16:04:48 UTC 2023
    - 8.4K bytes
    - Viewed (0)
Back to top