[libcxx-commits] [libcxx] [libc++] Slight reorganization of the benchmarks (PR #119625)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 11 14:38:32 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

<details>
<summary>Changes</summary>

Move various container benchmarks to the same subdirectory, and regroup some format-related benchmarks.

---
Full diff: https://github.com/llvm/llvm-project/pull/119625.diff


18 Files Affected:

- (renamed) libcxx/test/benchmarks/algorithms/algorithms.partition_point.bench.cpp (+2-2) 
- (renamed) libcxx/test/benchmarks/algorithms/lexicographical_compare_three_way.bench.cpp () 
- (renamed) libcxx/test/benchmarks/containers/ContainerBenchmarks.h (+1-1) 
- (renamed) libcxx/test/benchmarks/containers/deque.bench.cpp (+1-1) 
- (renamed) libcxx/test/benchmarks/containers/deque_iterator.bench.cpp () 
- (renamed) libcxx/test/benchmarks/containers/map.bench.cpp (+1-1) 
- (renamed) libcxx/test/benchmarks/containers/ordered_set.bench.cpp (+1-1) 
- (renamed) libcxx/test/benchmarks/containers/string.bench.cpp (+2-2) 
- (renamed) libcxx/test/benchmarks/containers/unordered_set_operations.bench.cpp (+1-1) 
- (renamed) libcxx/test/benchmarks/containers/vector_operations.bench.cpp (+1-1) 
- (renamed) libcxx/test/benchmarks/format/format.bench.cpp () 
- (renamed) libcxx/test/benchmarks/format/format_to.bench.cpp () 
- (renamed) libcxx/test/benchmarks/format/format_to_n.bench.cpp () 
- (renamed) libcxx/test/benchmarks/format/formatted_size.bench.cpp () 
- (renamed) libcxx/test/benchmarks/format/formatter_float.bench.cpp (+1-1) 
- (renamed) libcxx/test/benchmarks/format/formatter_int.bench.cpp (+1-1) 
- (renamed) libcxx/test/benchmarks/format/std_format_spec_string_unicode.bench.cpp () 
- (renamed) libcxx/test/benchmarks/format/std_format_spec_string_unicode_escape.bench.cpp () 


``````````diff
diff --git a/libcxx/test/benchmarks/algorithms.partition_point.bench.cpp b/libcxx/test/benchmarks/algorithms/algorithms.partition_point.bench.cpp
similarity index 98%
rename from libcxx/test/benchmarks/algorithms.partition_point.bench.cpp
rename to libcxx/test/benchmarks/algorithms/algorithms.partition_point.bench.cpp
index 42ebce8ad2f4ad..0777acbafb5ccb 100644
--- a/libcxx/test/benchmarks/algorithms.partition_point.bench.cpp
+++ b/libcxx/test/benchmarks/algorithms/algorithms.partition_point.bench.cpp
@@ -17,8 +17,8 @@
 
 #include "benchmark/benchmark.h"
 
-#include "CartesianBenchmarks.h"
-#include "GenerateInput.h"
+#include "../CartesianBenchmarks.h"
+#include "../GenerateInput.h"
 
 namespace {
 
diff --git a/libcxx/test/benchmarks/lexicographical_compare_three_way.bench.cpp b/libcxx/test/benchmarks/algorithms/lexicographical_compare_three_way.bench.cpp
similarity index 100%
rename from libcxx/test/benchmarks/lexicographical_compare_three_way.bench.cpp
rename to libcxx/test/benchmarks/algorithms/lexicographical_compare_three_way.bench.cpp
diff --git a/libcxx/test/benchmarks/ContainerBenchmarks.h b/libcxx/test/benchmarks/containers/ContainerBenchmarks.h
similarity index 99%
rename from libcxx/test/benchmarks/ContainerBenchmarks.h
rename to libcxx/test/benchmarks/containers/ContainerBenchmarks.h
index 458134c8191d12..6d21e12896ec9e 100644
--- a/libcxx/test/benchmarks/ContainerBenchmarks.h
+++ b/libcxx/test/benchmarks/containers/ContainerBenchmarks.h
@@ -15,7 +15,7 @@
 #include <utility>
 
 #include "benchmark/benchmark.h"
-#include "Utilities.h"
+#include "../Utilities.h"
 #include "test_iterators.h"
 
 namespace ContainerBenchmarks {
diff --git a/libcxx/test/benchmarks/deque.bench.cpp b/libcxx/test/benchmarks/containers/deque.bench.cpp
similarity index 98%
rename from libcxx/test/benchmarks/deque.bench.cpp
rename to libcxx/test/benchmarks/containers/deque.bench.cpp
index ab0ba96b12ffca..7ff1093a9391ca 100644
--- a/libcxx/test/benchmarks/deque.bench.cpp
+++ b/libcxx/test/benchmarks/containers/deque.bench.cpp
@@ -14,7 +14,7 @@
 #include "benchmark/benchmark.h"
 
 #include "ContainerBenchmarks.h"
-#include "GenerateInput.h"
+#include "../GenerateInput.h"
 
 using namespace ContainerBenchmarks;
 
diff --git a/libcxx/test/benchmarks/deque_iterator.bench.cpp b/libcxx/test/benchmarks/containers/deque_iterator.bench.cpp
similarity index 100%
rename from libcxx/test/benchmarks/deque_iterator.bench.cpp
rename to libcxx/test/benchmarks/containers/deque_iterator.bench.cpp
diff --git a/libcxx/test/benchmarks/map.bench.cpp b/libcxx/test/benchmarks/containers/map.bench.cpp
similarity index 99%
rename from libcxx/test/benchmarks/map.bench.cpp
rename to libcxx/test/benchmarks/containers/map.bench.cpp
index 81bdc5077f026f..e37c7d8d551635 100644
--- a/libcxx/test/benchmarks/map.bench.cpp
+++ b/libcxx/test/benchmarks/containers/map.bench.cpp
@@ -14,7 +14,7 @@
 #include <random>
 #include <vector>
 
-#include "CartesianBenchmarks.h"
+#include "../CartesianBenchmarks.h"
 #include "benchmark/benchmark.h"
 #include "test_macros.h"
 
diff --git a/libcxx/test/benchmarks/ordered_set.bench.cpp b/libcxx/test/benchmarks/containers/ordered_set.bench.cpp
similarity index 99%
rename from libcxx/test/benchmarks/ordered_set.bench.cpp
rename to libcxx/test/benchmarks/containers/ordered_set.bench.cpp
index 7883233c23aeee..cb68902c6dcc88 100644
--- a/libcxx/test/benchmarks/ordered_set.bench.cpp
+++ b/libcxx/test/benchmarks/containers/ordered_set.bench.cpp
@@ -17,7 +17,7 @@
 #include <string>
 #include <vector>
 
-#include "CartesianBenchmarks.h"
+#include "../CartesianBenchmarks.h"
 #include "benchmark/benchmark.h"
 #include "test_macros.h"
 
diff --git a/libcxx/test/benchmarks/string.bench.cpp b/libcxx/test/benchmarks/containers/string.bench.cpp
similarity index 99%
rename from libcxx/test/benchmarks/string.bench.cpp
rename to libcxx/test/benchmarks/containers/string.bench.cpp
index 0d7ce2b87bead6..f7da3e2da312b7 100644
--- a/libcxx/test/benchmarks/string.bench.cpp
+++ b/libcxx/test/benchmarks/containers/string.bench.cpp
@@ -13,8 +13,8 @@
 #include <new>
 #include <vector>
 
-#include "CartesianBenchmarks.h"
-#include "GenerateInput.h"
+#include "../CartesianBenchmarks.h"
+#include "../GenerateInput.h"
 #include "benchmark/benchmark.h"
 #include "test_macros.h"
 
diff --git a/libcxx/test/benchmarks/unordered_set_operations.bench.cpp b/libcxx/test/benchmarks/containers/unordered_set_operations.bench.cpp
similarity index 99%
rename from libcxx/test/benchmarks/unordered_set_operations.bench.cpp
rename to libcxx/test/benchmarks/containers/unordered_set_operations.bench.cpp
index 7b1700bfd850d1..a8448ef5a0cfb9 100644
--- a/libcxx/test/benchmarks/unordered_set_operations.bench.cpp
+++ b/libcxx/test/benchmarks/containers/unordered_set_operations.bench.cpp
@@ -18,7 +18,7 @@
 #include "benchmark/benchmark.h"
 
 #include "ContainerBenchmarks.h"
-#include "GenerateInput.h"
+#include "../GenerateInput.h"
 #include "test_macros.h"
 
 using namespace ContainerBenchmarks;
diff --git a/libcxx/test/benchmarks/vector_operations.bench.cpp b/libcxx/test/benchmarks/containers/vector_operations.bench.cpp
similarity index 99%
rename from libcxx/test/benchmarks/vector_operations.bench.cpp
rename to libcxx/test/benchmarks/containers/vector_operations.bench.cpp
index 3a72eaec4dd57e..9449bed31ec38c 100644
--- a/libcxx/test/benchmarks/vector_operations.bench.cpp
+++ b/libcxx/test/benchmarks/containers/vector_operations.bench.cpp
@@ -19,7 +19,7 @@
 
 #include "benchmark/benchmark.h"
 #include "ContainerBenchmarks.h"
-#include "GenerateInput.h"
+#include "../GenerateInput.h"
 
 using namespace ContainerBenchmarks;
 
diff --git a/libcxx/test/benchmarks/format.bench.cpp b/libcxx/test/benchmarks/format/format.bench.cpp
similarity index 100%
rename from libcxx/test/benchmarks/format.bench.cpp
rename to libcxx/test/benchmarks/format/format.bench.cpp
diff --git a/libcxx/test/benchmarks/format_to.bench.cpp b/libcxx/test/benchmarks/format/format_to.bench.cpp
similarity index 100%
rename from libcxx/test/benchmarks/format_to.bench.cpp
rename to libcxx/test/benchmarks/format/format_to.bench.cpp
diff --git a/libcxx/test/benchmarks/format_to_n.bench.cpp b/libcxx/test/benchmarks/format/format_to_n.bench.cpp
similarity index 100%
rename from libcxx/test/benchmarks/format_to_n.bench.cpp
rename to libcxx/test/benchmarks/format/format_to_n.bench.cpp
diff --git a/libcxx/test/benchmarks/formatted_size.bench.cpp b/libcxx/test/benchmarks/format/formatted_size.bench.cpp
similarity index 100%
rename from libcxx/test/benchmarks/formatted_size.bench.cpp
rename to libcxx/test/benchmarks/format/formatted_size.bench.cpp
diff --git a/libcxx/test/benchmarks/formatter_float.bench.cpp b/libcxx/test/benchmarks/format/formatter_float.bench.cpp
similarity index 99%
rename from libcxx/test/benchmarks/formatter_float.bench.cpp
rename to libcxx/test/benchmarks/format/formatter_float.bench.cpp
index ec20eab3c09371..77c067e7bc03e0 100644
--- a/libcxx/test/benchmarks/formatter_float.bench.cpp
+++ b/libcxx/test/benchmarks/format/formatter_float.bench.cpp
@@ -17,7 +17,7 @@
 #include <random>
 #include <string>
 
-#include "CartesianBenchmarks.h"
+#include "../CartesianBenchmarks.h"
 #include "benchmark/benchmark.h"
 
 // *** Localization ***
diff --git a/libcxx/test/benchmarks/formatter_int.bench.cpp b/libcxx/test/benchmarks/format/formatter_int.bench.cpp
similarity index 99%
rename from libcxx/test/benchmarks/formatter_int.bench.cpp
rename to libcxx/test/benchmarks/format/formatter_int.bench.cpp
index db0edab6ae0522..6df0187667aa19 100644
--- a/libcxx/test/benchmarks/formatter_int.bench.cpp
+++ b/libcxx/test/benchmarks/format/formatter_int.bench.cpp
@@ -12,7 +12,7 @@
 #include <format>
 #include <random>
 
-#include "CartesianBenchmarks.h"
+#include "../CartesianBenchmarks.h"
 #include "benchmark/benchmark.h"
 #include "test_macros.h"
 
diff --git a/libcxx/test/benchmarks/std_format_spec_string_unicode.bench.cpp b/libcxx/test/benchmarks/format/std_format_spec_string_unicode.bench.cpp
similarity index 100%
rename from libcxx/test/benchmarks/std_format_spec_string_unicode.bench.cpp
rename to libcxx/test/benchmarks/format/std_format_spec_string_unicode.bench.cpp
diff --git a/libcxx/test/benchmarks/std_format_spec_string_unicode_escape.bench.cpp b/libcxx/test/benchmarks/format/std_format_spec_string_unicode_escape.bench.cpp
similarity index 100%
rename from libcxx/test/benchmarks/std_format_spec_string_unicode_escape.bench.cpp
rename to libcxx/test/benchmarks/format/std_format_spec_string_unicode_escape.bench.cpp

``````````

</details>


https://github.com/llvm/llvm-project/pull/119625


More information about the libcxx-commits mailing list