From 6f3144920416bd53ad99780748407e6c80ef140a Mon Sep 17 00:00:00 2001 From: Tyler Rockwood Date: Wed, 15 Jan 2025 14:55:31 +0000 Subject: [PATCH 1/3] bazel/bench: add tests to benchmarks Just to smoke test they work. In both debug and release so hopefully we catch stuff in the sanitizer when we get that working. --- bazel/test.bzl | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/bazel/test.bzl b/bazel/test.bzl index 07076f81b8da2..2c13cc4ce6682 100644 --- a/bazel/test.bzl +++ b/bazel/test.bzl @@ -6,6 +6,7 @@ changes. For example, redpanda_cc_gtest will automatically configure Seastar for running tests, like setting a reasonable number of cores and amount of memory. """ +load("@bazel_skylib//rules:write_file.bzl", "write_file") load(":internal.bzl", "redpanda_copts") def has_flags(args, *flags): @@ -325,6 +326,7 @@ def redpanda_cc_bench( name, srcs = [], defines = [], + timeout = "short", deps = [], args = [], env = {}, @@ -346,6 +348,7 @@ def redpanda_cc_bench( memory: the amount of RAM needed for the benchmark data: any data files available to the benchmark as runfiles tags: custom tags for the test + timeout: the timeout for smoke testing the benchmark """ args = [ "--blocked-reactor-notify-ms 2000000", @@ -376,7 +379,28 @@ def redpanda_cc_bench( features = [ "layering_check", ], - tags = resource_tags + tags, + tags = tags, env = env, data = data, ) + write_file( + name = name + "_test_script", + out = name + "_test_wrapper.sh", + content = [ + "#!/bin/bash", + "exec $@ --iterations=1 --runs=1 --duration=0 --no-stdout --overprovisioned", + ], + ) + native.sh_test( + name = name + "_test", + timeout = timeout, + tags = resource_tags + tags, + srcs = [name + "_test_script"], + env = env, + args = [ + "$(rootpath :{})".format(name), + ] + args, + data = [ + ":" + name, + ] + data, + ) From a98b28520814b5ec92c0fb6d01d92d00a371ad6c Mon Sep 17 00:00:00 2001 From: Tyler Rockwood Date: Wed, 15 Jan 2025 16:19:29 +0000 Subject: [PATCH 2/3] wasm/bazel: update timeout for benchmark --- src/v/wasm/tests/BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/src/v/wasm/tests/BUILD b/src/v/wasm/tests/BUILD index 59e4cb4cc5b95..1cda28ab06be5 100644 --- a/src/v/wasm/tests/BUILD +++ b/src/v/wasm/tests/BUILD @@ -260,6 +260,7 @@ redpanda_cc_gtest( redpanda_cc_bench( name = "wasm_transform_rpbench", + timeout = "moderate", srcs = [ "wasm_transform_bench.cc", ], From 9966723613c5bdf132ab77b5acbdeb650e7330f9 Mon Sep 17 00:00:00 2001 From: Tyler Rockwood Date: Wed, 15 Jan 2025 16:41:42 +0000 Subject: [PATCH 3/3] datalake/bazel: bump record_multiplexer timeout --- src/v/datalake/tests/BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/src/v/datalake/tests/BUILD b/src/v/datalake/tests/BUILD index 99b9ec04d3bfc..1afaad6b5786d 100644 --- a/src/v/datalake/tests/BUILD +++ b/src/v/datalake/tests/BUILD @@ -355,6 +355,7 @@ redpanda_cc_gtest( redpanda_cc_bench( name = "record_multiplexer_rpbench", + timeout = "long", srcs = [ "record_multiplexer_bench.cc", ],