summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2022-09-06 12:02:16 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2022-09-06 12:03:05 -0700
commit60499cf45cde8e3354b58317efac7488cc5151b2 (patch)
treedb2dfabc2b6f3d9126fc787a6d45f8c6fe43c385
parentf2b8a81d637fd480c760e92b06a542bbc63843d2 (diff)
Convert algorithm and container benchmarks to cc_binary
PiperOrigin-RevId: 472521745 Change-Id: Ia76cd720d1036dce05f6332f41a2ff748b3ea971
-rw-r--r--absl/algorithm/BUILD.bazel3
-rw-r--r--absl/algorithm/equal_benchmark.cc2
-rw-r--r--absl/container/BUILD.bazel6
-rw-r--r--absl/container/fixed_array_benchmark.cc2
-rw-r--r--absl/container/inlined_vector_benchmark.cc2
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 <cstdint>
#include <cstring>
-#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 <string>
-#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 <string>
#include <vector>
-#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 {