[libcxx-commits] [libcxx] [libc++] Remove complexity calculations from <filesystem> benchmark (PR #158290)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Sep 12 06:33:50 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- libcxx/test/benchmarks/filesystem.bench.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/benchmarks/filesystem.bench.cpp b/libcxx/test/benchmarks/filesystem.bench.cpp
index 61d14a453..8b1af4519 100644
--- a/libcxx/test/benchmarks/filesystem.bench.cpp
+++ b/libcxx/test/benchmarks/filesystem.bench.cpp
@@ -74,10 +74,8 @@ template <class GenInputs>
void BM_PathConstructForwardIter(benchmark::State& st, GenInputs gen) {
BM_PathConstructIter<forward_iterator>(st, gen);
}
-BENCHMARK_CAPTURE(BM_PathConstructInputIter, large_string, getRandomStringInputs)
- ->Range(8, TestNumInputs);
-BENCHMARK_CAPTURE(BM_PathConstructForwardIter, large_string, getRandomStringInputs)
- ->Range(8, TestNumInputs);
+BENCHMARK_CAPTURE(BM_PathConstructInputIter, large_string, getRandomStringInputs)->Range(8, TestNumInputs);
+BENCHMARK_CAPTURE(BM_PathConstructForwardIter, large_string, getRandomStringInputs)->Range(8, TestNumInputs);
template <class GenInputs>
void BM_PathIterateMultipleTimes(benchmark::State& st, GenInputs gen) {
@@ -94,8 +92,7 @@ void BM_PathIterateMultipleTimes(benchmark::State& st, GenInputs gen) {
benchmark::ClobberMemory();
}
}
-BENCHMARK_CAPTURE(BM_PathIterateMultipleTimes, iterate_elements, getRandomStringInputs)
- ->Range(8, TestNumInputs);
+BENCHMARK_CAPTURE(BM_PathIterateMultipleTimes, iterate_elements, getRandomStringInputs)->Range(8, TestNumInputs);
template <class GenInputs>
void BM_PathIterateOnce(benchmark::State& st, GenInputs gen) {
@@ -154,12 +151,8 @@ void BM_LexicallyNormal(benchmark::State& st, GenInput gen, size_t PathLen) {
benchmark::DoNotOptimize(In.lexically_normal());
}
}
-BENCHMARK_CAPTURE(BM_LexicallyNormal, small_path, getRandomPaths, /*PathLen*/ 5)
- ->RangeMultiplier(2)
- ->Range(2, 256);
-BENCHMARK_CAPTURE(BM_LexicallyNormal, large_path, getRandomPaths, /*PathLen*/ 32)
- ->RangeMultiplier(2)
- ->Range(2, 256);
+BENCHMARK_CAPTURE(BM_LexicallyNormal, small_path, getRandomPaths, /*PathLen*/ 5)->RangeMultiplier(2)->Range(2, 256);
+BENCHMARK_CAPTURE(BM_LexicallyNormal, large_path, getRandomPaths, /*PathLen*/ 32)->RangeMultiplier(2)->Range(2, 256);
template <class GenInput>
void BM_LexicallyRelative(benchmark::State& st, GenInput gen, size_t PathLen) {
@@ -171,11 +164,7 @@ void BM_LexicallyRelative(benchmark::State& st, GenInput gen, size_t PathLen) {
benchmark::DoNotOptimize(TargetPath.lexically_relative(BasePath));
}
}
-BENCHMARK_CAPTURE(BM_LexicallyRelative, small_path, getRandomPaths, /*PathLen*/ 5)
- ->RangeMultiplier(2)
- ->Range(2, 256);
-BENCHMARK_CAPTURE(BM_LexicallyRelative, large_path, getRandomPaths, /*PathLen*/ 32)
- ->RangeMultiplier(2)
- ->Range(2, 256);
+BENCHMARK_CAPTURE(BM_LexicallyRelative, small_path, getRandomPaths, /*PathLen*/ 5)->RangeMultiplier(2)->Range(2, 256);
+BENCHMARK_CAPTURE(BM_LexicallyRelative, large_path, getRandomPaths, /*PathLen*/ 32)->RangeMultiplier(2)->Range(2, 256);
BENCHMARK_MAIN();
``````````
</details>
https://github.com/llvm/llvm-project/pull/158290
More information about the libcxx-commits
mailing list