mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
benchmarks: fix wrong file size for fio read
According to MakeCmd function of fio, the unit of --size option is MB. Signed-off-by: Chen Hui <cedriccchen@tencent.com>
This commit is contained in:
@@ -126,7 +126,7 @@ func BenchmarkFio(b *testing.B) {
|
||||
|
||||
// For reads, we need a file to read so make one inside the container.
|
||||
if strings.Contains(tc.Test, "read") {
|
||||
fallocateCmd := fmt.Sprintf("fallocate -l %dK %s", tc.Size, outfile)
|
||||
fallocateCmd := fmt.Sprintf("fallocate -l %dM %s", tc.Size, outfile)
|
||||
if out, err := container.Exec(ctx, dockerutil.ExecOpts{},
|
||||
strings.Split(fallocateCmd, " ")...); err != nil {
|
||||
b.Fatalf("failed to create readable file on mount: %v, %s", err, out)
|
||||
|
||||
Reference in New Issue
Block a user