blob: 4d8b3b40e3c16761f1dfaf69cb658bf62e63efb8 [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" Noble7c26eed2017-04-13 01:40:54 +020017load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary")
18
19grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080020 name = "parse_json",
Craig Tiller3a488472017-02-17 14:35:26 -080021 srcs = ["parse_json.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010022 hdrs = ["parse_json.h"],
Craig Tiller3a488472017-02-17 14:35:26 -080023 deps = ["//:grpc++"],
Nicolas "Pixel" Noble78f8ce32017-05-11 00:42:55 +020024 external_deps = ["protobuf"],
Craig Tiller3a488472017-02-17 14:35:26 -080025)
26
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020027grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080028 name = "qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010029 srcs = [
30 "client_async.cc",
31 "client_sync.cc",
32 "qps_worker.cc",
33 "server_async.cc",
34 "server_sync.cc",
35 ],
36 hdrs = [
37 "client.h",
38 "qps_worker.h",
39 "server.h",
40 ],
41 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010042 ":histogram",
43 ":interarrival",
44 ":usage_timer",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010045 "//:grpc",
46 "//:grpc++",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010047 "//src/proto/grpc/testing:control_proto",
48 "//src/proto/grpc/testing:payloads_proto",
49 "//src/proto/grpc/testing:services_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010050 "//test/core/end2end:ssl_test_data",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010051 "//test/core/util:gpr_test_util",
52 "//test/core/util:grpc_test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010053 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010054 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020055 external_deps = [
56 "gtest",
57 ],
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",
80 ],
81)
82
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020083grpc_cc_library(
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010084 name = "benchmark_config",
85 srcs = [
86 "benchmark_config.cc",
87 ],
88 hdrs = [
89 "benchmark_config.h",
90 ],
91 deps = [
92 ":driver_impl",
93 ":histogram",
94 "//:grpc++",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010095 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010096 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020097 external_deps = [
98 "gflags",
99 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800100)
101
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200102grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800103 name = "histogram",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100104 hdrs = [
105 "histogram.h",
106 "stats.h",
107 ],
108 deps = ["//:gpr"],
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 = "interarrival",
113 hdrs = ["interarrival.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100114 deps = ["//:grpc++"],
Craig Tiller3a488472017-02-17 14:35:26 -0800115)
116
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200117grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800118 name = "json_run_localhost",
119 srcs = ["json_run_localhost.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100120 deps = [
121 "//:gpr",
122 "//test/core/util:gpr_test_util",
123 "//test/core/util:grpc_test_util",
124 "//test/cpp/util:test_util",
125 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800126)
127
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200128grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800129 name = "qps_interarrival_test",
130 srcs = ["qps_interarrival_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100131 deps = [
132 ":histogram",
133 ":interarrival",
134 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800135)
136
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200137grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800138 name = "qps_json_driver",
139 srcs = ["qps_json_driver.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100140 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100141 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100142 ":driver_impl",
143 "//:grpc++",
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200144 ],
145 external_deps = [
146 "gflags",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100147 ],
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_openloop_test",
152 srcs = ["qps_openloop_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100153 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100154 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100155 ":driver_impl",
156 ":qps_worker_impl",
157 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800158)
159
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200160grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800161 name = "secure_sync_unary_ping_pong_test",
162 srcs = ["secure_sync_unary_ping_pong_test.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++",
167 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800168)
169
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200170grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800171 name = "usage_timer",
172 srcs = ["usage_timer.cc"],
173 hdrs = ["usage_timer.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100174 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800175)
176
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200177grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800178 name = "qps_worker",
179 srcs = ["worker.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100180 deps = [
181 ":qps_worker_impl",
182 "//:grpc++",
183 "//test/core/util:gpr_test_util",
184 "//test/core/util:grpc_test_util",
185 "//test/cpp/util:test_config",
186 "//test/cpp/util:test_util",
187 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800188)