Ai
1 Star 3 Fork 0

TimAndy/routine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
api_goid_test.go 424 Bytes
一键复制 编辑 原始数据 按行查看 历史
TimAndy 提交于 2023-10-16 09:35 +08:00 . Update benchmark result
package routine
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestGoid(t *testing.T) {
assert.NotEqual(t, 0, Goid())
assert.Equal(t, Goid(), Goid())
}
//===
// BenchmarkGoid-8 331324310 3.589 ns/op 0 B/op 0 allocs/op
func BenchmarkGoid(b *testing.B) {
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++ {
_ = Goid()
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/timandy/routine.git
git@gitee.com:timandy/routine.git
timandy
routine
routine
main

搜索帮助