blob: 6492b63ec3023a826a9bc6102086bd2147e8515b [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
32cc_library(
33 name = "parse_json",
Craig Tiller3a488472017-02-17 14:35:26 -080034 srcs = ["parse_json.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010035 hdrs = ["parse_json.h"],
Craig Tiller3a488472017-02-17 14:35:26 -080036 deps = ["//:grpc++"],
37)
38
39cc_library(
40 name = "qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010041 srcs = [
42 "client_async.cc",
43 "client_sync.cc",
44 "qps_worker.cc",
45 "server_async.cc",
46 "server_sync.cc",
47 ],
48 hdrs = [
49 "client.h",
50 "qps_worker.h",
51 "server.h",
52 ],
53 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010054 ":histogram",
55 ":interarrival",
56 ":usage_timer",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010057 "//:grpc",
58 "//:grpc++",
59 "//external:gtest",
60 "//src/proto/grpc/testing:control_proto",
61 "//src/proto/grpc/testing:payloads_proto",
62 "//src/proto/grpc/testing:services_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010063 "//test/core/end2end:ssl_test_data",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010064 "//test/core/util:gpr_test_util",
65 "//test/core/util:grpc_test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010066 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010067 ],
Craig Tiller3a488472017-02-17 14:35:26 -080068)
69
70cc_library(
71 name = "driver_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010072 srcs = [
73 "driver.cc",
74 "report.cc",
75 ],
76 hdrs = [
77 "driver.h",
78 "report.h",
79 ],
80 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010081 ":histogram",
82 ":parse_json",
83 ":qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010084 "//:grpc++",
85 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010086 "//src/proto/grpc/testing:messages_proto",
87 "//src/proto/grpc/testing:services_proto",
88 "//test/core/util:gpr_test_util",
89 "//test/core/util:grpc_test_util",
90 ],
91)
92
93cc_library(
94 name = "benchmark_config",
95 srcs = [
96 "benchmark_config.cc",
97 ],
98 hdrs = [
99 "benchmark_config.h",
100 ],
101 deps = [
102 ":driver_impl",
103 ":histogram",
104 "//:grpc++",
105 "//external:gflags",
106 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100107 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800108)
109
110cc_library(
111 name = "histogram",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100112 hdrs = [
113 "histogram.h",
114 "stats.h",
115 ],
116 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800117)
118
119cc_library(
120 name = "interarrival",
121 hdrs = ["interarrival.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100122 deps = ["//:grpc++"],
Craig Tiller3a488472017-02-17 14:35:26 -0800123)
124
125cc_binary(
126 name = "json_run_localhost",
127 srcs = ["json_run_localhost.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100128 deps = [
129 "//:gpr",
130 "//test/core/util:gpr_test_util",
131 "//test/core/util:grpc_test_util",
132 "//test/cpp/util:test_util",
133 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800134)
135
136cc_test(
137 name = "qps_interarrival_test",
138 srcs = ["qps_interarrival_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100139 deps = [
140 ":histogram",
141 ":interarrival",
142 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800143)
144
145cc_binary(
146 name = "qps_json_driver",
147 srcs = ["qps_json_driver.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100148 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100149 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100150 ":driver_impl",
151 "//:grpc++",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100152 "//external:gflags",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100153 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800154)
155
156cc_test(
157 name = "qps_openloop_test",
158 srcs = ["qps_openloop_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100159 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100160 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100161 ":driver_impl",
162 ":qps_worker_impl",
163 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800164)
165
166cc_test(
167 name = "secure_sync_unary_ping_pong_test",
168 srcs = ["secure_sync_unary_ping_pong_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100169 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100170 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100171 ":driver_impl",
172 "//:grpc++",
173 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800174)
175
176cc_library(
177 name = "usage_timer",
178 srcs = ["usage_timer.cc"],
179 hdrs = ["usage_timer.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100180 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800181)
182
183cc_binary(
184 name = "qps_worker",
185 srcs = ["worker.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100186 deps = [
187 ":qps_worker_impl",
188 "//:grpc++",
189 "//test/core/util:gpr_test_util",
190 "//test/core/util:grpc_test_util",
191 "//test/cpp/util:test_config",
192 "//test/cpp/util:test_util",
193 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800194)