Skip to content

Commit

Permalink
Fix ARC tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai committed Jul 5, 2023
1 parent 9af07c6 commit f4cd393
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions arc/arc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,24 @@
package arc

import (
"math/rand"
"crypto/rand"
"math"
"math/big"
mathrand "math/rand"
"testing"
"time"
)

func getRand(tb testing.TB) int64 {
out, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt64))
if err != nil {
tb.Fatal(err)
}
return out.Int64()
}

func init() {
rand.Seed(time.Now().Unix())
mathrand.Seed(time.Now().Unix())
}

func BenchmarkARC_Rand(b *testing.B) {
Expand Down

0 comments on commit f4cd393

Please sign in to comment.