aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2017-08-30 23:13:25 +0200
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2017-08-30 23:13:25 +0200
commit90df76b4633c6a3c8a492148ba5268b94284ea6a (patch)
tree91ec10271620b7d9baaf510bbfc11349bd4fa663 /test/cpp/microbenchmarks
parent2bc5e3ac40fc1b6f7d329a1727c78e8a820d5cf6 (diff)
parent7a8488c4d2b0274c7c71cd15d39f0cf277a3a119 (diff)
Merge branch 'master' of https://github.com/grpc/grpc into visibility
Diffstat (limited to 'test/cpp/microbenchmarks')
-rw-r--r--test/cpp/microbenchmarks/BUILD36
-rw-r--r--test/cpp/microbenchmarks/bm_fullstack_trickle.cc3
2 files changed, 25 insertions, 14 deletions
diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD
index 5ad9eb6872..83b91e2ce9 100644
--- a/test/cpp/microbenchmarks/BUILD
+++ b/test/cpp/microbenchmarks/BUILD
@@ -14,7 +14,7 @@
licenses(["notice"]) # Apache v2
-load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_package")
+load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary", "grpc_package")
grpc_package(name = "test/cpp/microbenchmarks")
@@ -28,6 +28,7 @@ grpc_cc_test(
grpc_cc_library(
name = "helpers",
+ testonly = 1,
srcs = ["helpers.cc"],
hdrs = [
"fullstack_context_mutators.h",
@@ -44,59 +45,68 @@ grpc_cc_library(
],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_closure",
+ testonly = 1,
srcs = ["bm_closure.cc"],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_cq",
+ testonly = 1,
srcs = ["bm_cq.cc"],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_cq_multiple_threads",
+ testonly = 1,
srcs = ["bm_cq_multiple_threads.cc"],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_error",
+ testonly = 1,
srcs = ["bm_error.cc"],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_fullstack_streaming_ping_pong",
+ testonly = 1,
srcs = ["bm_fullstack_streaming_ping_pong.cc"],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_fullstack_streaming_pump",
+ testonly = 1,
srcs = ["bm_fullstack_streaming_pump.cc"],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_fullstack_trickle",
+ testonly = 1,
srcs = ["bm_fullstack_trickle.cc"],
- deps = [":helpers"],
- external_deps = [
- "gflags",
+ deps = [
+ ":helpers",
+ "//test/cpp/util:test_config",
],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_fullstack_unary_ping_pong",
+ testonly = 1,
srcs = ["bm_fullstack_unary_ping_pong.cc"],
deps = [":helpers"],
)
-grpc_cc_test(
+grpc_cc_binary(
name = "bm_metadata",
+ testonly = 1,
srcs = ["bm_metadata.cc"],
deps = [":helpers"],
)
diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
index 5c44b9751f..135b4710ce 100644
--- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
+++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
@@ -26,6 +26,7 @@
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/cpp/microbenchmarks/fullstack_context_mutators.h"
#include "test/cpp/microbenchmarks/fullstack_fixtures.h"
+#include "test/cpp/util/test_config.h"
extern "C" {
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/ext/transport/chttp2/transport/internal.h"
@@ -420,6 +421,6 @@ BENCHMARK(BM_PumpUnbalancedUnary_Trickle)->Apply(UnaryTrickleArgs);
int main(int argc, char** argv) {
::benchmark::Initialize(&argc, argv);
- ::google::ParseCommandLineFlags(&argc, &argv, false);
+ ::grpc::testing::InitTest(&argc, &argv, false);
::benchmark::RunSpecifiedBenchmarks();
}