chore: use fastrand to replace math/rand

This commit is contained in:
wwqgtxx
2023-03-06 18:10:14 +08:00
parent ad6336231c
commit 6a97ab9ecb
26 changed files with 109 additions and 111 deletions

View File

@ -1,10 +1,10 @@
package pool
import (
"math/rand"
"testing"
"github.com/stretchr/testify/assert"
"github.com/zhangyunhao116/fastrand"
)
func TestAllocGet(t *testing.T) {
@ -43,6 +43,6 @@ func TestAllocPutThenGet(t *testing.T) {
func BenchmarkMSB(b *testing.B) {
for i := 0; i < b.N; i++ {
msb(rand.Int())
msb(fastrand.Int())
}
}