blob: de46847963b0cee1ae0201b741638f6cabe646a2 [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
34grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080035 name = "parse_json",
Craig Tiller3a488472017-02-17 14:35:26 -080036 srcs = ["parse_json.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010037 hdrs = ["parse_json.h"],
Craig Tiller3a488472017-02-17 14:35:26 -080038 deps = ["//:grpc++"],
39)
40
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020041grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080042 name = "qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010043 srcs = [
44 "client_async.cc",
45 "client_sync.cc",
46 "qps_worker.cc",
47 "server_async.cc",
48 "server_sync.cc",
49 ],
50 hdrs = [
51 "client.h",
52 "qps_worker.h",
53 "server.h",
54 ],
55 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010056 ":histogram",
57 ":interarrival",
58 ":usage_timer",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010059 "//:grpc",
60 "//:grpc++",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010061 "//src/proto/grpc/testing:control_proto",
62 "//src/proto/grpc/testing:payloads_proto",
63 "//src/proto/grpc/testing:services_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010064 "//test/core/end2end:ssl_test_data",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010065 "//test/core/util:gpr_test_util",
66 "//test/core/util:grpc_test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010067 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010068 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020069 external_deps = [
70 "gtest",
71 ],
Craig Tiller3a488472017-02-17 14:35:26 -080072)
73
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020074grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080075 name = "driver_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010076 srcs = [
77 "driver.cc",
78 "report.cc",
79 ],
80 hdrs = [
81 "driver.h",
82 "report.h",
83 ],
84 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010085 ":histogram",
86 ":parse_json",
87 ":qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010088 "//:grpc++",
89 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010090 "//src/proto/grpc/testing:messages_proto",
91 "//src/proto/grpc/testing:services_proto",
92 "//test/core/util:gpr_test_util",
93 "//test/core/util:grpc_test_util",
94 ],
95)
96
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020097grpc_cc_library(
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010098 name = "benchmark_config",
99 srcs = [
100 "benchmark_config.cc",
101 ],
102 hdrs = [
103 "benchmark_config.h",
104 ],
105 deps = [
106 ":driver_impl",
107 ":histogram",
108 "//:grpc++",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100109 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100110 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200111 external_deps = [
112 "gflags",
113 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800114)
115
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200116grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800117 name = "histogram",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100118 hdrs = [
119 "histogram.h",
120 "stats.h",
121 ],
122 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800123)
124
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200125grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800126 name = "interarrival",
127 hdrs = ["interarrival.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100128 deps = ["//:grpc++"],
Craig Tiller3a488472017-02-17 14:35:26 -0800129)
130
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200131grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800132 name = "json_run_localhost",
133 srcs = ["json_run_localhost.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100134 deps = [
135 "//:gpr",
136 "//test/core/util:gpr_test_util",
137 "//test/core/util:grpc_test_util",
138 "//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",
148 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800149)
150
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200151grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800152 name = "qps_json_driver",
153 srcs = ["qps_json_driver.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100154 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100155 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100156 ":driver_impl",
157 "//:grpc++",
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200158 ],
159 external_deps = [
160 "gflags",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100161 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800162)
163
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200164grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800165 name = "qps_openloop_test",
166 srcs = ["qps_openloop_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100167 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100168 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100169 ":driver_impl",
170 ":qps_worker_impl",
171 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800172)
173
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200174grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800175 name = "secure_sync_unary_ping_pong_test",
176 srcs = ["secure_sync_unary_ping_pong_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100177 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100178 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100179 ":driver_impl",
180 "//:grpc++",
181 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800182)
183
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200184grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800185 name = "usage_timer",
186 srcs = ["usage_timer.cc"],
187 hdrs = ["usage_timer.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100188 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800189)
190
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200191grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800192 name = "qps_worker",
193 srcs = ["worker.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100194 deps = [
195 ":qps_worker_impl",
196 "//:grpc++",
197 "//test/core/util:gpr_test_util",
198 "//test/core/util:grpc_test_util",
199 "//test/cpp/util:test_config",
200 "//test/cpp/util:test_util",
201 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800202)