blob: 0d91d52f2213d6ae5f7470e503b345a8170d95ba [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",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010050 "//src/proto/grpc/testing:control_proto",
51 "//src/proto/grpc/testing:payloads_proto",
52 "//src/proto/grpc/testing:services_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010053 "//test/core/end2end:ssl_test_data",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010054 "//test/core/util:gpr_test_util",
55 "//test/core/util:grpc_test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010056 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010057 ],
Craig Tiller3a488472017-02-17 14:35:26 -080058)
59
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020060grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080061 name = "driver_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010062 srcs = [
63 "driver.cc",
64 "report.cc",
65 ],
66 hdrs = [
67 "driver.h",
68 "report.h",
69 ],
70 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010071 ":histogram",
72 ":parse_json",
73 ":qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010074 "//:grpc++",
75 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010076 "//src/proto/grpc/testing:messages_proto",
77 "//src/proto/grpc/testing:services_proto",
78 "//test/core/util:gpr_test_util",
79 "//test/core/util:grpc_test_util",
Guantao Liuabe3cf52017-07-12 17:36:30 -070080 "//test/cpp/util:test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010081 ],
82)
83
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020084grpc_cc_library(
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010085 name = "benchmark_config",
86 srcs = [
87 "benchmark_config.cc",
88 ],
89 hdrs = [
90 "benchmark_config.h",
91 ],
92 deps = [
93 ":driver_impl",
94 ":histogram",
95 "//:grpc++",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010096 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010097 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020098 external_deps = [
99 "gflags",
100 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800101)
102
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200103grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800104 name = "histogram",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100105 hdrs = [
106 "histogram.h",
107 "stats.h",
108 ],
109 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800110)
111
Vijay Pai088112f2017-08-24 10:42:27 -0700112grpc_cc_test(
113 name = "inproc_sync_unary_ping_pong_test",
114 srcs = ["inproc_sync_unary_ping_pong_test.cc"],
115 deps = [
116 ":benchmark_config",
117 ":driver_impl",
118 "//:grpc++",
119 "//test/cpp/util:test_config",
120 "//test/cpp/util:test_util",
121 ],
122)
123
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200124grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800125 name = "interarrival",
126 hdrs = ["interarrival.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100127 deps = ["//:grpc++"],
Craig Tiller3a488472017-02-17 14:35:26 -0800128)
129
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200130grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800131 name = "json_run_localhost",
132 srcs = ["json_run_localhost.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100133 deps = [
134 "//:gpr",
135 "//test/core/util:gpr_test_util",
136 "//test/core/util:grpc_test_util",
yang-gb575a342017-07-13 09:47:27 -0700137 "//test/cpp/util:test_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100138 "//test/cpp/util:test_util",
139 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800140)
141
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200142grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800143 name = "qps_interarrival_test",
144 srcs = ["qps_interarrival_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100145 deps = [
146 ":histogram",
147 ":interarrival",
yang-gb575a342017-07-13 09:47:27 -0700148 "//test/cpp/util:test_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100149 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800150)
151
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200152grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800153 name = "qps_json_driver",
154 srcs = ["qps_json_driver.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100155 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100156 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100157 ":driver_impl",
158 "//:grpc++",
Guantao Liuabe3cf52017-07-12 17:36:30 -0700159 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700160 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200161 ],
162 external_deps = [
163 "gflags",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100164 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800165)
166
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200167grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800168 name = "qps_openloop_test",
169 srcs = ["qps_openloop_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100170 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100171 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100172 ":driver_impl",
173 ":qps_worker_impl",
yang-gb575a342017-07-13 09:47:27 -0700174 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700175 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100176 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800177)
178
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200179grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800180 name = "secure_sync_unary_ping_pong_test",
181 srcs = ["secure_sync_unary_ping_pong_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100182 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100183 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100184 ":driver_impl",
185 "//:grpc++",
yang-gb575a342017-07-13 09:47:27 -0700186 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700187 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100188 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800189)
190
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200191grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800192 name = "usage_timer",
193 srcs = ["usage_timer.cc"],
194 hdrs = ["usage_timer.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100195 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800196)
197
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200198grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800199 name = "qps_worker",
200 srcs = ["worker.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100201 deps = [
202 ":qps_worker_impl",
203 "//:grpc++",
204 "//test/core/util:gpr_test_util",
205 "//test/core/util:grpc_test_util",
206 "//test/cpp/util:test_config",
207 "//test/cpp/util:test_util",
208 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800209)