MCPcopy Create free account
hub / github.com/devfeel/dotweb / BenchmarkItemContext_Set_Parallel

Function BenchmarkItemContext_Set_Parallel

core/concurrenceMap_test.go:80–87  ·  view source on GitHub ↗

并发效率

(b *testing.B)

Source from the content-addressed store, hash-verified

78
79// 并发效率
80func BenchmarkItemContext_Set_Parallel(b *testing.B) {
81 b.RunParallel(func(pb *testing.PB) {
82 var num uint64 = 1
83 for pb.Next() {
84 ic.Set(fmt.Sprint(num), num)
85 }
86 })
87}
88
89// 基准测试
90func BenchmarkItemContext_Get_1(b *testing.B) {

Callers

nothing calls this directly

Calls 2

NextMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected