Add bench testing

This commit is contained in:
guanguans 2021-01-25 17:08:17 +08:00
parent 654498ad8b
commit 332dd2a6d4

View File

@ -81,7 +81,7 @@ func BenchmarkUpgradeId(b *testing.B) {
for _, bm := range benchmarks { for _, bm := range benchmarks {
b.Run(bm.name, func(b *testing.B) { b.Run(bm.name, func(b *testing.B) {
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
UpgradeId(bm.id)
} }
}) })
} }