blob: b958c75fc7ca63b8cb9b540a7238b89b4d669dbe [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",
Alex Polcyn92e0a702018-07-21 07:38:34 +000037 "qps_server_builder.cc",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010038 ],
39 hdrs = [
40 "client.h",
41 "qps_worker.h",
42 "server.h",
Alex Polcyn92e0a702018-07-21 07:38:34 +000043 "qps_server_builder.h",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010044 ],
45 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010046 ":histogram",
47 ":interarrival",
48 ":usage_timer",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010049 "//:grpc",
50 "//:grpc++",
Craig Tillere1101cf2017-09-06 09:42:20 -070051 "//:grpc++_core_stats",
kpayson647a20c962018-04-18 15:19:55 -070052 "//src/proto/grpc/testing:benchmark_service_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010053 "//src/proto/grpc/testing:control_proto",
54 "//src/proto/grpc/testing:payloads_proto",
kpayson647a20c962018-04-18 15:19:55 -070055 "//src/proto/grpc/testing:worker_service_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010056 "//test/core/end2end:ssl_test_data",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010057 "//test/core/util:gpr_test_util",
58 "//test/core/util:grpc_test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010059 "//test/cpp/util:test_util",
Alex Polcyn92e0a702018-07-21 07:38:34 +000060 "//test/cpp/util:test_config",
61 ],
62 external_deps = [
63 "gflags",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010064 ],
Craig Tiller3a488472017-02-17 14:35:26 -080065)
66
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020067grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080068 name = "driver_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010069 srcs = [
70 "driver.cc",
71 "report.cc",
72 ],
73 hdrs = [
74 "driver.h",
75 "report.h",
76 ],
77 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010078 ":histogram",
79 ":parse_json",
80 ":qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010081 "//:grpc++",
82 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010083 "//src/proto/grpc/testing:messages_proto",
kpayson647a20c962018-04-18 15:19:55 -070084 "//src/proto/grpc/testing:report_qps_scenario_service_proto",
85 "//src/proto/grpc/testing:worker_service_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010086 "//test/core/util:gpr_test_util",
87 "//test/core/util:grpc_test_util",
Guantao Liuabe3cf52017-07-12 17:36:30 -070088 "//test/cpp/util:test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010089 ],
90)
91
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020092grpc_cc_library(
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010093 name = "benchmark_config",
94 srcs = [
95 "benchmark_config.cc",
96 ],
97 hdrs = [
98 "benchmark_config.h",
99 ],
100 deps = [
101 ":driver_impl",
102 ":histogram",
103 "//:grpc++",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100104 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100105 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200106 external_deps = [
107 "gflags",
108 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800109)
110
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200111grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800112 name = "histogram",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100113 hdrs = [
114 "histogram.h",
115 "stats.h",
116 ],
Vijay Pai195cf1e2017-11-30 10:56:06 -0800117 deps = ["//test/core/util:grpc_test_util"],
Craig Tiller3a488472017-02-17 14:35:26 -0800118)
119
Vijay Pai088112f2017-08-24 10:42:27 -0700120grpc_cc_test(
121 name = "inproc_sync_unary_ping_pong_test",
122 srcs = ["inproc_sync_unary_ping_pong_test.cc"],
123 deps = [
124 ":benchmark_config",
125 ":driver_impl",
126 "//:grpc++",
127 "//test/cpp/util:test_config",
128 "//test/cpp/util:test_util",
129 ],
130)
131
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200132grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800133 name = "interarrival",
134 hdrs = ["interarrival.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100135 deps = ["//:grpc++"],
Craig Tiller3a488472017-02-17 14:35:26 -0800136)
137
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200138grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800139 name = "json_run_localhost",
140 srcs = ["json_run_localhost.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100141 deps = [
142 "//:gpr",
143 "//test/core/util:gpr_test_util",
144 "//test/core/util:grpc_test_util",
yang-gb575a342017-07-13 09:47:27 -0700145 "//test/cpp/util:test_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100146 "//test/cpp/util:test_util",
147 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800148)
149
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200150grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800151 name = "qps_interarrival_test",
152 srcs = ["qps_interarrival_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100153 deps = [
154 ":histogram",
155 ":interarrival",
yang-gb575a342017-07-13 09:47:27 -0700156 "//test/cpp/util:test_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100157 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800158)
159
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200160grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800161 name = "qps_json_driver",
162 srcs = ["qps_json_driver.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100163 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100164 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100165 ":driver_impl",
166 "//:grpc++",
Guantao Liuabe3cf52017-07-12 17:36:30 -0700167 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700168 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200169 ],
170 external_deps = [
171 "gflags",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100172 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800173)
174
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200175grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800176 name = "qps_openloop_test",
177 srcs = ["qps_openloop_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100178 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100179 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100180 ":driver_impl",
181 ":qps_worker_impl",
yang-gb575a342017-07-13 09:47:27 -0700182 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700183 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100184 ],
Adele Zhou8edd5682018-07-12 17:50:55 -0700185 data = ["//third_party/toolchains:RBE_USE_MACHINE_TYPE_LARGE"],
Craig Tiller3a488472017-02-17 14:35:26 -0800186)
187
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200188grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800189 name = "secure_sync_unary_ping_pong_test",
190 srcs = ["secure_sync_unary_ping_pong_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100191 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100192 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100193 ":driver_impl",
194 "//:grpc++",
yang-gb575a342017-07-13 09:47:27 -0700195 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700196 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100197 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800198)
199
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200200grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800201 name = "usage_timer",
202 srcs = ["usage_timer.cc"],
203 hdrs = ["usage_timer.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100204 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800205)
206
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200207grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800208 name = "qps_worker",
209 srcs = ["worker.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100210 deps = [
211 ":qps_worker_impl",
212 "//:grpc++",
213 "//test/core/util:gpr_test_util",
214 "//test/core/util:grpc_test_util",
215 "//test/cpp/util:test_config",
216 "//test/cpp/util:test_util",
217 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800218)