[libcxx-commits] [libcxx] [libc++] Slight reorganization of the benchmarks (PR #119625)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 11 14:38:00 PST 2024
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/119625
Move various container benchmarks to the same subdirectory, and regroup some format-related benchmarks.
>From b724057e06eae9baf5ac4031bb28cc24710a4967 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 11 Dec 2024 17:36:38 -0500
Subject: [PATCH] [libc++] Slight reorganization of the benchmarks
Move various container benchmarks to the same subdirectory, and
regroup some format-related benchmarks.
---
.../{ => algorithms}/algorithms.partition_point.bench.cpp | 4 ++--
.../lexicographical_compare_three_way.bench.cpp | 0
libcxx/test/benchmarks/{ => containers}/ContainerBenchmarks.h | 2 +-
libcxx/test/benchmarks/{ => containers}/deque.bench.cpp | 2 +-
.../test/benchmarks/{ => containers}/deque_iterator.bench.cpp | 0
libcxx/test/benchmarks/{ => containers}/map.bench.cpp | 2 +-
libcxx/test/benchmarks/{ => containers}/ordered_set.bench.cpp | 2 +-
libcxx/test/benchmarks/{ => containers}/string.bench.cpp | 4 ++--
.../{ => containers}/unordered_set_operations.bench.cpp | 2 +-
.../benchmarks/{ => containers}/vector_operations.bench.cpp | 2 +-
libcxx/test/benchmarks/{ => format}/format.bench.cpp | 0
libcxx/test/benchmarks/{ => format}/format_to.bench.cpp | 0
libcxx/test/benchmarks/{ => format}/format_to_n.bench.cpp | 0
libcxx/test/benchmarks/{ => format}/formatted_size.bench.cpp | 0
libcxx/test/benchmarks/{ => format}/formatter_float.bench.cpp | 2 +-
libcxx/test/benchmarks/{ => format}/formatter_int.bench.cpp | 2 +-
.../{ => format}/std_format_spec_string_unicode.bench.cpp | 0
.../std_format_spec_string_unicode_escape.bench.cpp | 0
18 files changed, 12 insertions(+), 12 deletions(-)
rename libcxx/test/benchmarks/{ => algorithms}/algorithms.partition_point.bench.cpp (98%)
rename libcxx/test/benchmarks/{ => algorithms}/lexicographical_compare_three_way.bench.cpp (100%)
rename libcxx/test/benchmarks/{ => containers}/ContainerBenchmarks.h (99%)
rename libcxx/test/benchmarks/{ => containers}/deque.bench.cpp (98%)
rename libcxx/test/benchmarks/{ => containers}/deque_iterator.bench.cpp (100%)
rename libcxx/test/benchmarks/{ => containers}/map.bench.cpp (99%)
rename libcxx/test/benchmarks/{ => containers}/ordered_set.bench.cpp (99%)
rename libcxx/test/benchmarks/{ => containers}/string.bench.cpp (99%)
rename libcxx/test/benchmarks/{ => containers}/unordered_set_operations.bench.cpp (99%)
rename libcxx/test/benchmarks/{ => containers}/vector_operations.bench.cpp (99%)
rename libcxx/test/benchmarks/{ => format}/format.bench.cpp (100%)
rename libcxx/test/benchmarks/{ => format}/format_to.bench.cpp (100%)
rename libcxx/test/benchmarks/{ => format}/format_to_n.bench.cpp (100%)
rename libcxx/test/benchmarks/{ => format}/formatted_size.bench.cpp (100%)
rename libcxx/test/benchmarks/{ => format}/formatter_float.bench.cpp (99%)
rename libcxx/test/benchmarks/{ => format}/formatter_int.bench.cpp (99%)
rename libcxx/test/benchmarks/{ => format}/std_format_spec_string_unicode.bench.cpp (100%)
rename libcxx/test/benchmarks/{ => format}/std_format_spec_string_unicode_escape.bench.cpp (100%)
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
More information about the libcxx-commits
mailing list