性能测试 基准测试
(b *testing.B)
| 70 | |
| 71 | // 基准测试 |
| 72 | func BenchmarkItemContext_Set_1(b *testing.B) { |
| 73 | var num uint64 = 1 |
| 74 | for i := 0; i < b.N; i++ { |
| 75 | ic.Set(fmt.Sprint(num), num) |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | // 并发效率 |
| 80 | func BenchmarkItemContext_Set_Parallel(b *testing.B) { |