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

Function BenchmarkList_Add

internal/utils/expires/list_test.go:207–215  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

205}
206
207func BenchmarkList_Add(b *testing.B) {
208 var list = expires.NewList()
209 b.ResetTimer()
210 b.RunParallel(func(pb *testing.PB) {
211 for pb.Next() {
212 list.Add(rand.Uint64(), fasttime.Now().Unix()+int64(rand.Int()%10_000_000))
213 }
214 })
215}
216
217func Benchmark_Map_Uint64(b *testing.B) {
218 runtime.GOMAXPROCS(1)

Callers

nothing calls this directly

Calls 5

NewListFunction · 0.92
NowFunction · 0.92
NextMethod · 0.80
UnixMethod · 0.80
AddMethod · 0.65

Tested by

no test coverage detected