[benchmarks] Replace runsc build benchmark.

The runsc build benchmark has been broken for some time
now, due to a dependency issue on a deprecated and
removed library "zlib". The fact that the benchmark lives
in the same WORKSPACE file as runsc itself complicates
things such that it isn't worth maintaining.

Replace this benchmark with one that builds a GRPC library
with bazel instead.

PiperOrigin-RevId: 461112203
This commit is contained in:
Zach Koopmans
2022-07-14 20:44:32 -07:00
committed by gVisor bot
parent 2ceb6bb1f8
commit 551d65b4e5
3 changed files with 32 additions and 2 deletions
+2 -2
View File
@@ -386,8 +386,8 @@ steps:
label: ":bazel: ABSL build benchmarks"
command: make -i benchmark-platforms BENCHMARKS_FILTER="ABSL/page_cache.clean" BENCHMARKS_SUITE=absl BENCHMARKS_TARGETS=test/benchmarks/fs:bazel_test BENCHMARKS_OPTIONS=-test.benchtime=1ns
- <<: *benchmarks
label: ":go: runsc build benchmarks"
command: make -i benchmark-platforms BENCHMARKS_FILTER="Runsc/page_cache.clean/filesystem.bind" BENCHMARKS_SUITE=runsc BENCHMARKS_TARGETS=test/benchmarks/fs:bazel_test BENCHMARKS_OPTIONS=-test.benchtime=1ns
label: ":exploding_death_star: gRPC build benchmarks"
command: make -i benchmark-platforms BENCHMARKS_FILTER="GRPC/page_cache.clean/filesystem.bind" BENCHMARKS_SUITE=grpc-build BENCHMARKS_TARGETS=test/benchmarks/fs:bazel_test BENCHMARKS_OPTIONS=-test.benchtime=1ns
- <<: *benchmarks
label: ":metal: FFMPEG benchmarks"
command: make -i benchmark-platforms BENCHMARKS_SUITE=ffmpeg BENCHMARKS_TARGETS=test/benchmarks/media:ffmpeg_test BENCHMARKS_OPTIONS=-test.benchtime=1ns
@@ -0,0 +1,24 @@
FROM ubuntu:18.04
RUN set -x \
&& apt-get update \
&& apt-get install -y \
autoconf \
build-essential \
clang \
curl \
libtool \
pkg-config \
git \
unzip \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-installer-linux-x86_64.sh
RUN chmod +x bazel-4.2.1-installer-linux-x86_64.sh
RUN ./bazel-4.2.1-installer-linux-x86_64.sh
RUN mkdir grpc && cd grpc \
&& git init && git remote add origin https://github.com/grpc/grpc.git \
&& git fetch --depth 1 origin a672e22bd1e10b3ff2a91aaae5aee3a65cc95bfe && git checkout FETCH_HEAD
+6
View File
@@ -44,6 +44,12 @@ func BenchmarkBuildRunsc(b *testing.B) {
runBuildBenchmark(b, "benchmarks/runsc", "/gvisor", "runsc:runsc")
}
// Note: CleanCache versions of this test require running with root permissions.
// Note: This test takes on the order of 6m per permutation for runsc on kvm.
func BenchmarkBuildGRPC(b *testing.B) {
runBuildBenchmark(b, "benchmarks/build-grpc", "/grpc", ":grpc")
}
func runBuildBenchmark(b *testing.B, image, workdir, target string) {
b.Helper()
// Get a machine from the Harness on which to run.