From 6b84005651517c9136a32cec49db8333a5b40ee9 Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Wed, 13 Sep 2017 11:49:18 -0700 Subject: [PATCH] Add independent library targets for newly added .h files for microbenchmarks. Also fix includes in fullstack_fixtures.h --- test/cpp/microbenchmarks/BUILD | 34 ++++++++++++++++--- .../microbenchmarks/bm_fullstack_trickle.cc | 1 - test/cpp/microbenchmarks/fullstack_fixtures.h | 1 + .../fullstack_streaming_ping_pong.h | 1 - .../fullstack_streaming_pump.h | 1 - .../fullstack_unary_ping_pong.h | 1 - 6 files changed, 30 insertions(+), 9 deletions(-) diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD index 985a335f1b3..0b69e9ba9aa 100644 --- a/test/cpp/microbenchmarks/BUILD +++ b/test/cpp/microbenchmarks/BUILD @@ -73,12 +73,29 @@ grpc_cc_binary( deps = [":helpers"], ) +grpc_cc_library( + name = "fullstack_streaming_ping_pong_h", + testonly = 1, + hdrs = [ + "fullstack_streaming_ping_pong.h", + ], + deps = [":helpers"], +) + grpc_cc_binary( name = "bm_fullstack_streaming_ping_pong", testonly = 1, srcs = [ "bm_fullstack_streaming_ping_pong.cc", - "fullstack_streaming_ping_pong.h", + ], + deps = [":fullstack_streaming_ping_pong_h"], +) + +grpc_cc_library( + name = "fullstack_streaming_pump_h", + testonly = 1, + hdrs = [ + "fullstack_streaming_pump.h", ], deps = [":helpers"], ) @@ -88,9 +105,8 @@ grpc_cc_binary( testonly = 1, srcs = [ "bm_fullstack_streaming_pump.cc", - "fullstack_streaming_pump.h", ], - deps = [":helpers"], + deps = [":fullstack_streaming_pump_h"], ) grpc_cc_binary( @@ -103,14 +119,22 @@ grpc_cc_binary( ], ) +grpc_cc_library( + name = "fullstack_unary_ping_pong_h", + testonly = 1, + hdrs = [ + "fullstack_unary_ping_pong.h", + ], + deps = [":helpers"], +) + grpc_cc_binary( name = "bm_fullstack_unary_ping_pong", testonly = 1, srcs = [ "bm_fullstack_unary_ping_pong.cc", - "fullstack_unary_ping_pong.h", ], - deps = [":helpers"], + deps = [":fullstack_unary_ping_pong_h"], ) grpc_cc_binary( diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc index 59fb29dd600..2656566a50b 100644 --- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc +++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc @@ -22,7 +22,6 @@ #include #include #include "src/core/lib/profiling/timers.h" -#include "src/cpp/client/create_channel_internal.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/microbenchmarks/fullstack_context_mutators.h" #include "test/cpp/microbenchmarks/fullstack_fixtures.h" diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h index 5477b860b4f..ecd28c3f8ac 100644 --- a/test/cpp/microbenchmarks/fullstack_fixtures.h +++ b/test/cpp/microbenchmarks/fullstack_fixtures.h @@ -41,6 +41,7 @@ extern "C" { #include "test/core/util/port.h" } +#include "src/cpp/client/create_channel_internal.h" #include "test/cpp/microbenchmarks/helpers.h" namespace grpc { diff --git a/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h b/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h index ff1f9667536..6df044f3440 100644 --- a/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h +++ b/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h @@ -24,7 +24,6 @@ #include #include #include "src/core/lib/profiling/timers.h" -#include "src/cpp/client/create_channel_internal.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/microbenchmarks/fullstack_context_mutators.h" #include "test/cpp/microbenchmarks/fullstack_fixtures.h" diff --git a/test/cpp/microbenchmarks/fullstack_streaming_pump.h b/test/cpp/microbenchmarks/fullstack_streaming_pump.h index f9db212b02c..9e826091ec6 100644 --- a/test/cpp/microbenchmarks/fullstack_streaming_pump.h +++ b/test/cpp/microbenchmarks/fullstack_streaming_pump.h @@ -24,7 +24,6 @@ #include #include #include "src/core/lib/profiling/timers.h" -#include "src/cpp/client/create_channel_internal.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/microbenchmarks/fullstack_context_mutators.h" #include "test/cpp/microbenchmarks/fullstack_fixtures.h" diff --git a/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h b/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h index 76d278b2a00..d4489382952 100644 --- a/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h +++ b/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h @@ -24,7 +24,6 @@ #include #include #include "src/core/lib/profiling/timers.h" -#include "src/cpp/client/create_channel_internal.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/microbenchmarks/fullstack_context_mutators.h" #include "test/cpp/microbenchmarks/fullstack_fixtures.h"