MCPcopy Create free account
hub / github.com/RainbowMango/GoExpertProgramming / BenchmarkSetBytes

Function BenchmarkSetBytes

source/gotest/benchmark_test.go:20–25  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

18}
19
20func BenchmarkSetBytes(b *testing.B) {
21 b.SetBytes(1024 * 1024)
22 for i := 0; i < b.N; i++ {
23 time.Sleep(1 * time.Second) // 模拟待测函数
24 }
25}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected