From 18657459acbf0645d879eb49f061c071bdef8388 Mon Sep 17 00:00:00 2001 From: Chen Hui Date: Wed, 14 Sep 2022 10:44:37 +0800 Subject: [PATCH] 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 --- test/benchmarks/fs/fio_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/benchmarks/fs/fio_test.go b/test/benchmarks/fs/fio_test.go index 44546e6bc..202805afa 100644 --- a/test/benchmarks/fs/fio_test.go +++ b/test/benchmarks/fs/fio_test.go @@ -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)