fix build

This commit is contained in:
chrislu
2025-08-27 14:55:38 -07:00
parent af1589f7c9
commit 02ef812375
4 changed files with 5 additions and 5 deletions
@@ -33,7 +33,7 @@ func main() {
f, err := os.Create(fmt.Sprintf("%s/file%05d", *toDir, i))
check(err)
fileSize := *minSize + rand.IntN(*maxSize-*minSize)
fileSize := *minSize + rand.Intn(*maxSize-*minSize)
startTime := time.Now()
fmt.Printf("write %s %d bytes: ", f.Name(), fileSize)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt"
"log"
"math"
"math/rand"
"math/rand/v2"
"strconv"
"testing"
+2 -2
View File
@@ -157,7 +157,7 @@ func doSomeWritesDeletes(i int, v *Volume, t *testing.T, infos []*needleInfo) {
}
// println("written file", i, "checksum", n.Checksum.Value(), "size", size)
if rand.Float64() < 0.03 {
toBeDeleted := rand.IntN(i) + 1
toBeDeleted := rand.Intn(i) + 1
oldNeedle := newEmptyNeedle(uint64(toBeDeleted))
v.deleteNeedle2(oldNeedle)
// println("deleted file", toBeDeleted)
@@ -175,7 +175,7 @@ type needleInfo struct {
func newRandomNeedle(id uint64) *needle.Needle {
n := new(needle.Needle)
n.Data = make([]byte, rand.IntN(1024))
n.Data = make([]byte, rand.Intn(1024))
rand.Read(n.Data)
n.Checksum = needle.NewCRC(n.Data)
+1 -1
View File
@@ -2,7 +2,7 @@ package skiplist
import (
"bytes"
"math/rand"
"math/rand/v2"
"strconv"
"testing"
)