blob: 389ed7ba7db068f924de4a13fa79d06072407338 [file] [log] [blame]
Craig Tiller3a488472017-02-17 14:35:26 -08001# Copyright 2017, Google Inc.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met:
7#
8# * Redistributions of source code must retain the above copyright
9# notice, this list of conditions and the following disclaimer.
10# * Redistributions in binary form must reproduce the above
11# copyright notice, this list of conditions and the following disclaimer
12# in the documentation and/or other materials provided with the
13# distribution.
14# * Neither the name of Google Inc. nor the names of its
15# contributors may be used to endorse or promote products derived from
16# this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30licenses(["notice"]) # 3-clause BSD
31
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020032load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary")
33
Nicolas "Pixel" Nobleaf6c83f2017-05-19 00:38:10 +020034package(
35 features = [
36 "-layering_check",
37 "-parse_headers",
38 ],
39)
40
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020041grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080042 name = "parse_json",
Craig Tiller3a488472017-02-17 14:35:26 -080043 srcs = ["parse_json.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010044 hdrs = ["parse_json.h"],
Craig Tiller3a488472017-02-17 14:35:26 -080045 deps = ["//:grpc++"],
Nicolas "Pixel" Noble78f8ce32017-05-11 00:42:55 +020046 external_deps = ["protobuf"],
Craig Tiller3a488472017-02-17 14:35:26 -080047)
48
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020049grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080050 name = "qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010051 srcs = [
52 "client_async.cc",
53 "client_sync.cc",
54 "qps_worker.cc",
55 "server_async.cc",
56 "server_sync.cc",
57 ],
58 hdrs = [
59 "client.h",
60 "qps_worker.h",
61 "server.h",
62 ],
63 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010064 ":histogram",
65 ":interarrival",
66 ":usage_timer",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010067 "//:grpc",
68 "//:grpc++",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010069 "//src/proto/grpc/testing:control_proto",
70 "//src/proto/grpc/testing:payloads_proto",
71 "//src/proto/grpc/testing:services_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010072 "//test/core/end2end:ssl_test_data",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010073 "//test/core/util:gpr_test_util",
74 "//test/core/util:grpc_test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010075 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010076 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020077 external_deps = [
78 "gtest",
79 ],
Craig Tiller3a488472017-02-17 14:35:26 -080080)
81
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020082grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080083 name = "driver_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010084 srcs = [
85 "driver.cc",
86 "report.cc",
87 ],
88 hdrs = [
89 "driver.h",
90 "report.h",
91 ],
92 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010093 ":histogram",
94 ":parse_json",
95 ":qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010096 "//:grpc++",
97 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010098 "//src/proto/grpc/testing:messages_proto",
99 "//src/proto/grpc/testing:services_proto",
100 "//test/core/util:gpr_test_util",
101 "//test/core/util:grpc_test_util",
102 ],
103)
104
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200105grpc_cc_library(
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100106 name = "benchmark_config",
107 srcs = [
108 "benchmark_config.cc",
109 ],
110 hdrs = [
111 "benchmark_config.h",
112 ],
113 deps = [
114 ":driver_impl",
115 ":histogram",
116 "//:grpc++",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100117 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100118 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200119 external_deps = [
120 "gflags",
121 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800122)
123
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200124grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800125 name = "histogram",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100126 hdrs = [
127 "histogram.h",
128 "stats.h",
129 ],
130 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800131)
132
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200133grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800134 name = "interarrival",
135 hdrs = ["interarrival.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100136 deps = ["//:grpc++"],
Craig Tiller3a488472017-02-17 14:35:26 -0800137)
138
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200139grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800140 name = "json_run_localhost",
141 srcs = ["json_run_localhost.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100142 deps = [
143 "//:gpr",
144 "//test/core/util:gpr_test_util",
145 "//test/core/util:grpc_test_util",
146 "//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",
156 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800157)
158
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200159grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800160 name = "qps_json_driver",
161 srcs = ["qps_json_driver.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100162 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100163 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100164 ":driver_impl",
165 "//:grpc++",
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200166 ],
167 external_deps = [
168 "gflags",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100169 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800170)
171
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200172grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800173 name = "qps_openloop_test",
174 srcs = ["qps_openloop_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100175 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100176 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100177 ":driver_impl",
178 ":qps_worker_impl",
179 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800180)
181
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200182grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800183 name = "secure_sync_unary_ping_pong_test",
184 srcs = ["secure_sync_unary_ping_pong_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100185 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100186 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100187 ":driver_impl",
188 "//:grpc++",
189 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800190)
191
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200192grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800193 name = "usage_timer",
194 srcs = ["usage_timer.cc"],
195 hdrs = ["usage_timer.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100196 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800197)
198
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200199grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800200 name = "qps_worker",
201 srcs = ["worker.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100202 deps = [
203 ":qps_worker_impl",
204 "//:grpc++",
205 "//test/core/util:gpr_test_util",
206 "//test/core/util:grpc_test_util",
207 "//test/cpp/util:test_config",
208 "//test/cpp/util:test_util",
209 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800210)