blob: a348b880796f8d311055241c8e5d8f4859f937a1 [file] [log] [blame]
Jan Tattermusch7897ae92017-06-07 22:57:36 +02001# Copyright 2017 gRPC authors.
Craig Tiller3a488472017-02-17 14:35:26 -08002#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02003# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
Craig Tiller3a488472017-02-17 14:35:26 -08006#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02007# http://www.apache.org/licenses/LICENSE-2.0
Craig Tiller3a488472017-02-17 14:35:26 -08008#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02009# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Craig Tiller3a488472017-02-17 14:35:26 -080014
Jan Tattermusch4d5c3102017-06-07 10:23:56 +020015licenses(["notice"]) # Apache v2
Craig Tiller3a488472017-02-17 14:35:26 -080016
Nicolas "Pixel" Noble2bc5e3a2017-08-15 22:32:52 +020017load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary", "grpc_package")
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020018
Nicolas "Pixel" Noble2bc5e3a2017-08-15 22:32:52 +020019grpc_package(name = "test/cpp/qps")
Nicolas "Pixel" Nobleaf6c83f2017-05-19 00:38:10 +020020
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020021grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080022 name = "parse_json",
Craig Tiller3a488472017-02-17 14:35:26 -080023 srcs = ["parse_json.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010024 hdrs = ["parse_json.h"],
Craig Tiller3a488472017-02-17 14:35:26 -080025 deps = ["//:grpc++"],
Nicolas "Pixel" Noble78f8ce32017-05-11 00:42:55 +020026 external_deps = ["protobuf"],
Craig Tiller3a488472017-02-17 14:35:26 -080027)
28
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020029grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080030 name = "qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010031 srcs = [
32 "client_async.cc",
33 "client_sync.cc",
34 "qps_worker.cc",
35 "server_async.cc",
36 "server_sync.cc",
37 ],
38 hdrs = [
39 "client.h",
40 "qps_worker.h",
41 "server.h",
42 ],
43 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010044 ":histogram",
45 ":interarrival",
46 ":usage_timer",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010047 "//:grpc",
48 "//:grpc++",
Craig Tillere1101cf2017-09-06 09:42:20 -070049 "//:grpc++_core_stats",
kpayson647a20c962018-04-18 15:19:55 -070050 "//src/proto/grpc/testing:benchmark_service_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010051 "//src/proto/grpc/testing:control_proto",
52 "//src/proto/grpc/testing:payloads_proto",
kpayson647a20c962018-04-18 15:19:55 -070053 "//src/proto/grpc/testing:worker_service_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010054 "//test/core/end2end:ssl_test_data",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010055 "//test/core/util:gpr_test_util",
56 "//test/core/util:grpc_test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010057 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010058 ],
Craig Tiller3a488472017-02-17 14:35:26 -080059)
60
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020061grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080062 name = "driver_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010063 srcs = [
64 "driver.cc",
65 "report.cc",
66 ],
67 hdrs = [
68 "driver.h",
69 "report.h",
70 ],
71 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010072 ":histogram",
73 ":parse_json",
74 ":qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010075 "//:grpc++",
76 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010077 "//src/proto/grpc/testing:messages_proto",
kpayson647a20c962018-04-18 15:19:55 -070078 "//src/proto/grpc/testing:report_qps_scenario_service_proto",
79 "//src/proto/grpc/testing:worker_service_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010080 "//test/core/util:gpr_test_util",
81 "//test/core/util:grpc_test_util",
Guantao Liuabe3cf52017-07-12 17:36:30 -070082 "//test/cpp/util:test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010083 ],
84)
85
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020086grpc_cc_library(
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010087 name = "benchmark_config",
88 srcs = [
89 "benchmark_config.cc",
90 ],
91 hdrs = [
92 "benchmark_config.h",
93 ],
94 deps = [
95 ":driver_impl",
96 ":histogram",
97 "//:grpc++",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010098 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010099 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200100 external_deps = [
101 "gflags",
102 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800103)
104
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200105grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800106 name = "histogram",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100107 hdrs = [
108 "histogram.h",
109 "stats.h",
110 ],
Vijay Pai195cf1e2017-11-30 10:56:06 -0800111 deps = ["//test/core/util:grpc_test_util"],
Craig Tiller3a488472017-02-17 14:35:26 -0800112)
113
Vijay Pai088112f2017-08-24 10:42:27 -0700114grpc_cc_test(
115 name = "inproc_sync_unary_ping_pong_test",
116 srcs = ["inproc_sync_unary_ping_pong_test.cc"],
117 deps = [
118 ":benchmark_config",
119 ":driver_impl",
120 "//:grpc++",
121 "//test/cpp/util:test_config",
122 "//test/cpp/util:test_util",
123 ],
124)
125
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200126grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800127 name = "interarrival",
128 hdrs = ["interarrival.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100129 deps = ["//:grpc++"],
Craig Tiller3a488472017-02-17 14:35:26 -0800130)
131
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200132grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800133 name = "json_run_localhost",
134 srcs = ["json_run_localhost.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100135 deps = [
136 "//:gpr",
137 "//test/core/util:gpr_test_util",
138 "//test/core/util:grpc_test_util",
yang-gb575a342017-07-13 09:47:27 -0700139 "//test/cpp/util:test_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100140 "//test/cpp/util:test_util",
141 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800142)
143
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200144grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800145 name = "qps_interarrival_test",
146 srcs = ["qps_interarrival_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100147 deps = [
148 ":histogram",
149 ":interarrival",
yang-gb575a342017-07-13 09:47:27 -0700150 "//test/cpp/util:test_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100151 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800152)
153
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200154grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800155 name = "qps_json_driver",
156 srcs = ["qps_json_driver.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100157 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100158 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100159 ":driver_impl",
160 "//:grpc++",
Guantao Liuabe3cf52017-07-12 17:36:30 -0700161 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700162 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200163 ],
164 external_deps = [
165 "gflags",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100166 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800167)
168
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200169grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800170 name = "qps_openloop_test",
171 srcs = ["qps_openloop_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100172 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100173 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100174 ":driver_impl",
175 ":qps_worker_impl",
yang-gb575a342017-07-13 09:47:27 -0700176 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700177 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100178 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800179)
180
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200181grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800182 name = "secure_sync_unary_ping_pong_test",
183 srcs = ["secure_sync_unary_ping_pong_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100184 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100185 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100186 ":driver_impl",
187 "//:grpc++",
yang-gb575a342017-07-13 09:47:27 -0700188 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700189 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100190 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800191)
192
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200193grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800194 name = "usage_timer",
195 srcs = ["usage_timer.cc"],
196 hdrs = ["usage_timer.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100197 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800198)
199
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200200grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800201 name = "qps_worker",
202 srcs = ["worker.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100203 deps = [
204 ":qps_worker_impl",
205 "//:grpc++",
206 "//test/core/util:gpr_test_util",
207 "//test/core/util:grpc_test_util",
208 "//test/cpp/util:test_config",
209 "//test/cpp/util:test_util",
210 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800211)