From 60499cf45cde8e3354b58317efac7488cc5151b2 Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Tue, 6 Sep 2022 12:02:16 -0700 Subject: Convert algorithm and container benchmarks to cc_binary PiperOrigin-RevId: 472521745 Change-Id: Ia76cd720d1036dce05f6332f41a2ff748b3ea971 --- absl/algorithm/BUILD.bazel | 3 ++- absl/algorithm/equal_benchmark.cc | 2 +- absl/container/BUILD.bazel | 6 ++++-- absl/container/fixed_array_benchmark.cc | 2 +- absl/container/inlined_vector_benchmark.cc | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/absl/algorithm/BUILD.bazel b/absl/algorithm/BUILD.bazel index f6d74714..3a9ab013 100644 --- a/absl/algorithm/BUILD.bazel +++ b/absl/algorithm/BUILD.bazel @@ -48,8 +48,9 @@ cc_test( ], ) -cc_test( +cc_binary( name = "algorithm_benchmark", + testonly = 1, srcs = ["equal_benchmark.cc"], copts = ABSL_TEST_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, diff --git a/absl/algorithm/equal_benchmark.cc b/absl/algorithm/equal_benchmark.cc index 7bf62c9a..948cd65c 100644 --- a/absl/algorithm/equal_benchmark.cc +++ b/absl/algorithm/equal_benchmark.cc @@ -15,8 +15,8 @@ #include #include -#include "benchmark/benchmark.h" #include "absl/algorithm/algorithm.h" +#include "benchmark/benchmark.h" namespace { diff --git a/absl/container/BUILD.bazel b/absl/container/BUILD.bazel index b9b3f7bb..d749c1ca 100644 --- a/absl/container/BUILD.bazel +++ b/absl/container/BUILD.bazel @@ -96,8 +96,9 @@ cc_test( ], ) -cc_test( +cc_binary( name = "fixed_array_benchmark", + testonly = 1, srcs = ["fixed_array_benchmark.cc"], copts = ABSL_TEST_COPTS + ["$(STACK_FRAME_UNLIMITED)"], linkopts = ABSL_DEFAULT_LINKOPTS, @@ -166,8 +167,9 @@ cc_test( ], ) -cc_test( +cc_binary( name = "inlined_vector_benchmark", + testonly = 1, srcs = ["inlined_vector_benchmark.cc"], copts = ABSL_TEST_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, diff --git a/absl/container/fixed_array_benchmark.cc b/absl/container/fixed_array_benchmark.cc index 3c7a5a72..db6663e6 100644 --- a/absl/container/fixed_array_benchmark.cc +++ b/absl/container/fixed_array_benchmark.cc @@ -16,8 +16,8 @@ #include -#include "benchmark/benchmark.h" #include "absl/container/fixed_array.h" +#include "benchmark/benchmark.h" namespace { diff --git a/absl/container/inlined_vector_benchmark.cc b/absl/container/inlined_vector_benchmark.cc index e256fad6..56a6bfd2 100644 --- a/absl/container/inlined_vector_benchmark.cc +++ b/absl/container/inlined_vector_benchmark.cc @@ -16,11 +16,11 @@ #include #include -#include "benchmark/benchmark.h" #include "absl/base/internal/raw_logging.h" #include "absl/base/macros.h" #include "absl/container/inlined_vector.h" #include "absl/strings/str_cat.h" +#include "benchmark/benchmark.h" namespace { -- cgit v1.2.3