MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / BenchmarkItem_Increase

Function BenchmarkItem_Increase

internal/utils/counters/item_test.go:70–82  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

68}
69
70func BenchmarkItem_Increase(b *testing.B) {
71 runtime.GOMAXPROCS(1)
72
73 b.ReportAllocs()
74
75 b.RunParallel(func(pb *testing.PB) {
76 for pb.Next() {
77 var item = counters.NewItem[uint32](60)
78 item.Increase()
79 item.Sum()
80 }
81 })
82}

Callers

nothing calls this directly

Calls 3

NextMethod · 0.80
IncreaseMethod · 0.45
SumMethod · 0.45

Tested by

no test coverage detected