blob: c6a1fd2fcee56d33ccbe2a7411f2a1577e347e44 [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++"],
Nicolas "Pixel" Noble78f8ce32017-05-11 00:42:55 +020039 external_deps = ["protobuf"],
Craig Tiller3a488472017-02-17 14:35:26 -080040)
41
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020042grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080043 name = "qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010044 srcs = [
45 "client_async.cc",
46 "client_sync.cc",
47 "qps_worker.cc",
48 "server_async.cc",
49 "server_sync.cc",
50 ],
51 hdrs = [
52 "client.h",
53 "qps_worker.h",
54 "server.h",
55 ],
56 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010057 ":histogram",
58 ":interarrival",
59 ":usage_timer",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010060 "//:grpc",
61 "//:grpc++",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010062 "//src/proto/grpc/testing:control_proto",
63 "//src/proto/grpc/testing:payloads_proto",
64 "//src/proto/grpc/testing:services_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010065 "//test/core/end2end:ssl_test_data",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010066 "//test/core/util:gpr_test_util",
67 "//test/core/util:grpc_test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010068 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010069 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020070 external_deps = [
71 "gtest",
72 ],
Craig Tiller3a488472017-02-17 14:35:26 -080073)
74
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020075grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080076 name = "driver_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010077 srcs = [
78 "driver.cc",
79 "report.cc",
80 ],
81 hdrs = [
82 "driver.h",
83 "report.h",
84 ],
85 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010086 ":histogram",
87 ":parse_json",
88 ":qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010089 "//:grpc++",
90 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010091 "//src/proto/grpc/testing:messages_proto",
92 "//src/proto/grpc/testing:services_proto",
93 "//test/core/util:gpr_test_util",
94 "//test/core/util:grpc_test_util",
95 ],
96)
97
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020098grpc_cc_library(
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010099 name = "benchmark_config",
100 srcs = [
101 "benchmark_config.cc",
102 ],
103 hdrs = [
104 "benchmark_config.h",
105 ],
106 deps = [
107 ":driver_impl",
108 ":histogram",
109 "//:grpc++",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100110 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100111 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200112 external_deps = [
113 "gflags",
114 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800115)
116
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200117grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800118 name = "histogram",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100119 hdrs = [
120 "histogram.h",
121 "stats.h",
122 ],
123 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800124)
125
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200126grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800127 name = "interarrival",
128 hdrs = ["interarrival.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100129 deps = ["//:grpc++"],
Craig Tiller3a488472017-02-17 14:35:26 -0800130)
131
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200132grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800133 name = "json_run_localhost",
134 srcs = ["json_run_localhost.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100135 deps = [
136 "//:gpr",
137 "//test/core/util:gpr_test_util",
138 "//test/core/util:grpc_test_util",
139 "//test/cpp/util:test_util",
140 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800141)
142
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200143grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800144 name = "qps_interarrival_test",
145 srcs = ["qps_interarrival_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100146 deps = [
147 ":histogram",
148 ":interarrival",
149 ],
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++",
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200159 ],
160 external_deps = [
161 "gflags",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100162 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800163)
164
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200165grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800166 name = "qps_openloop_test",
167 srcs = ["qps_openloop_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100168 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100169 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100170 ":driver_impl",
171 ":qps_worker_impl",
172 ],
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 = "secure_sync_unary_ping_pong_test",
177 srcs = ["secure_sync_unary_ping_pong_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 "//:grpc++",
182 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800183)
184
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200185grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800186 name = "usage_timer",
187 srcs = ["usage_timer.cc"],
188 hdrs = ["usage_timer.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100189 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800190)
191
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200192grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800193 name = "qps_worker",
194 srcs = ["worker.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100195 deps = [
196 ":qps_worker_impl",
197 "//:grpc++",
198 "//test/core/util:gpr_test_util",
199 "//test/core/util:grpc_test_util",
200 "//test/cpp/util:test_config",
201 "//test/cpp/util:test_util",
202 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800203)