MCPcopy
hub / github.com/lindb/lindb / Benchmark_DeltaCounterVec

Function Benchmark_DeltaCounterVec

internal/linmetric/counter_delta_vec_test.go:40–47  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

38}
39
40func Benchmark_DeltaCounterVec(b *testing.B) {
41 scope := BrokerRegistry.NewScope("vec_test")
42 vec := scope.NewCounterVec("counter", "1", "2")
43
44 for i := 0; i < b.N; i++ {
45 vec.WithTagValues("3", "4").Incr()
46 }
47}
48
49func Benchmark_DeltaCounter(b *testing.B) {
50 for i := 0; i < b.N; i++ {

Callers

nothing calls this directly

Calls 4

NewCounterVecMethod · 0.95
NewScopeMethod · 0.80
IncrMethod · 0.45
WithTagValuesMethod · 0.45

Tested by

no test coverage detected