Skip to content

Commit

Permalink
fixing static check error
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-prince committed Nov 10, 2024
1 parent 7de2a52 commit 92c5241
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions benchmark-script/read_operation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"flag"
"fmt"
"io"
"math"
"math/rand"
"os"
"path"
Expand Down Expand Up @@ -83,7 +82,9 @@ func readAlreadyOpenedFile(index int) (err error) {
}

func getRandReadPattern() []int64 {
numOfRanges := int64(math.Ceil(float64((int64(*fFileSizeMB) * 1024 * 1024) / (int64(*fBlockSizeKB) * 1024))))
fileSizeBytes := int64(*fFileSizeMB) * 1024 * 1024
blockSizeBytes := int64(*fBlockSizeKB) * 1024
numOfRanges := (fileSizeBytes + blockSizeBytes - 1) / blockSizeBytes
pattern := make([]int64, numOfRanges)
indices := make([]int64, numOfRanges)
for i := int64(0); i < numOfRanges; i++ {
Expand Down

0 comments on commit 92c5241

Please sign in to comment.