Skip to content
Ricky
Chinese

搜尋

Searching… No matching pages. Matching pages are listed below. Search is unavailable. Please try again.

Benchmark

Recent posts

Golang 基准测试 基本使用 基准测试常用于代码性能测试,函数需要导入 testing 包,并定义以 Benchmark 开头的函数, 参数为 testing.B 指针类型,在测试函数中循环调用函数多次 ➜ go test -bench=. -run=none goos: darwin goarch: amd64 pkg: pkg06 cpu: Intel(R) Core(TM) i7-8850H CPU @ …

All posts

1 post
Golang基准测试
3 分鐘