摘要: 1、基本使用 基准测试常用于代码性能测试,函数需要导入testing包,并定义以Benchmark开头的函数, 参数为testing.B指针类型,在测试函数中循环调用函数多次 go test testcalc/calc -bench . go test testcalc/calc -bench . 阅读全文
posted @ 2021-08-19 00:26 SSgeek 阅读(650) 评论(0) 推荐(0)