snowflake/flake_test.go
2016-06-01 14:59:26 -05:00

17 lines
186 B
Go

package flake
import (
"testing"
)
func BenchmarkGenerate(b *testing.B) {
node, _ := NewNode(1)
b.ReportAllocs()
for n := 0; n < b.N; n++ {
_, _ = node.GenerateNoSleep()
}
}