summaryrefslogtreecommitdiffhomepage
path: root/test/benchmarks/fs/bazel_test.go
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2020-07-29 10:05:46 -0700
committergVisor bot <gvisor-bot@google.com>2020-07-29 10:15:53 -0700
commit1715896fc81fce0302e790186302d7460838a918 (patch)
tree6523389e79ef4983c2e384896ab404b76ff960e9 /test/benchmarks/fs/bazel_test.go
parent6b4e11ab5074d41044e63337973ac2438ce2278e (diff)
Port fio benchmark
PiperOrigin-RevId: 323810654
Diffstat (limited to 'test/benchmarks/fs/bazel_test.go')
-rw-r--r--test/benchmarks/fs/bazel_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/benchmarks/fs/bazel_test.go b/test/benchmarks/fs/bazel_test.go
index 9b652fd43..3854aa87c 100644
--- a/test/benchmarks/fs/bazel_test.go
+++ b/test/benchmarks/fs/bazel_test.go
@@ -20,6 +20,7 @@ import (
"testing"
"gvisor.dev/gvisor/pkg/test/dockerutil"
+ "gvisor.dev/gvisor/test/benchmarks/harness"
)
// Note: CleanCache versions of this test require running with root permissions.
@@ -77,8 +78,8 @@ func BenchmarkABSL(b *testing.B) {
b.StopTimer()
// Drop Caches for clear cache runs.
if bm.clearCache {
- if out, err := machine.RunCommand("/bin/sh", "-c", "sync && sysctl vm.drop_caches=3"); err != nil {
- b.Skipf("failed to drop caches: %v %s. You probably need root.", err, out)
+ if err := harness.DropCaches(machine); err != nil {
+ b.Skipf("failed to drop caches: %v. You probably need root.", err)
}
}
b.StartTimer()