Make the filesystem benchmark test less expensive (#7794)

While some of the slowness here is unrelated, there isn't really any
reason to test even as much of the benchmark as it is.
This commit is contained in:
Chandler Carruth
2026-09-17 12:41:59 +00:00
committed by GitHub
parent ccb5ba1b92
commit 5c601f8224
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -287,9 +287,9 @@ sh_test(
srcs = [":filesystem_benchmark"],
args = [
"--benchmark_dry_run",
# Restrict the sizes to 4-digit ones or smaller to keep test times low.
# Restrict the sizes to 2-digit ones or smaller to keep test times low.
# The `$$` is repeated for Bazel escaping of `$`.
"--benchmark_filter=^[^/]+(/[0-9]{1,4}(/[0-9]+)?)?/real_time$$",
"--benchmark_filter=^[^/]+(/[0-9]{1,2}(/[0-9]+)?)?/real_time$$",
],
)
+2 -2
View File
@@ -444,9 +444,9 @@ auto BM_CreateDirectories(benchmark::State& state) -> void {
CARBON_CHECK(existing_depth <= depth);
CARBON_CHECK(depth > 0);
// Use a batch size of 10 to get avoid completely swamping the measurements
// Use a batch size of 5 to get avoid completely swamping the measurements
// with overhead from creating existing directories and cleaning up.
constexpr int BatchSize = 10;
constexpr int BatchSize = 5;
// Pre-build both the paths and the existing paths. Note that we use
// relatively short paths here, which if anything makes the benefits of the