blob: b3348b76fab4e3624cd184bfba9aed030bbaf665 [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
Nicolas "Pixel" Nobleaf6c83f2017-05-19 00:38:10 +020019package(
20 features = [
21 "-layering_check",
22 "-parse_headers",
23 ],
24)
25
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020026grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080027 name = "parse_json",
Craig Tiller3a488472017-02-17 14:35:26 -080028 srcs = ["parse_json.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010029 hdrs = ["parse_json.h"],
Craig Tiller3a488472017-02-17 14:35:26 -080030 deps = ["//:grpc++"],
Nicolas "Pixel" Noble78f8ce32017-05-11 00:42:55 +020031 external_deps = ["protobuf"],
Craig Tiller3a488472017-02-17 14:35:26 -080032)
33
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020034grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080035 name = "qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010036 srcs = [
37 "client_async.cc",
38 "client_sync.cc",
39 "qps_worker.cc",
40 "server_async.cc",
41 "server_sync.cc",
42 ],
43 hdrs = [
44 "client.h",
45 "qps_worker.h",
46 "server.h",
47 ],
48 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010049 ":histogram",
50 ":interarrival",
51 ":usage_timer",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010052 "//:grpc",
53 "//:grpc++",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010054 "//src/proto/grpc/testing:control_proto",
55 "//src/proto/grpc/testing:payloads_proto",
56 "//src/proto/grpc/testing:services_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010057 "//test/core/end2end:ssl_test_data",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010058 "//test/core/util:gpr_test_util",
59 "//test/core/util:grpc_test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010060 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010061 ],
Craig Tiller3a488472017-02-17 14:35:26 -080062)
63
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020064grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -080065 name = "driver_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010066 srcs = [
67 "driver.cc",
68 "report.cc",
69 ],
70 hdrs = [
71 "driver.h",
72 "report.h",
73 ],
74 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010075 ":histogram",
76 ":parse_json",
77 ":qps_worker_impl",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +010078 "//:grpc++",
79 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010080 "//src/proto/grpc/testing:messages_proto",
81 "//src/proto/grpc/testing:services_proto",
82 "//test/core/util:gpr_test_util",
83 "//test/core/util:grpc_test_util",
Guantao Liuabe3cf52017-07-12 17:36:30 -070084 "//test/cpp/util:test_util",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010085 ],
86)
87
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +020088grpc_cc_library(
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +010089 name = "benchmark_config",
90 srcs = [
91 "benchmark_config.cc",
92 ],
93 hdrs = [
94 "benchmark_config.h",
95 ],
96 deps = [
97 ":driver_impl",
98 ":histogram",
99 "//:grpc++",
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100100 "//src/proto/grpc/testing:control_proto",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100101 ],
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200102 external_deps = [
103 "gflags",
104 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800105)
106
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200107grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800108 name = "histogram",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100109 hdrs = [
110 "histogram.h",
111 "stats.h",
112 ],
113 deps = ["//:gpr"],
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 = "interarrival",
118 hdrs = ["interarrival.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100119 deps = ["//:grpc++"],
Craig Tiller3a488472017-02-17 14:35:26 -0800120)
121
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200122grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800123 name = "json_run_localhost",
124 srcs = ["json_run_localhost.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100125 deps = [
126 "//:gpr",
127 "//test/core/util:gpr_test_util",
128 "//test/core/util:grpc_test_util",
yang-gb575a342017-07-13 09:47:27 -0700129 "//test/cpp/util:test_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100130 "//test/cpp/util:test_util",
131 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800132)
133
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200134grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800135 name = "qps_interarrival_test",
136 srcs = ["qps_interarrival_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100137 deps = [
138 ":histogram",
139 ":interarrival",
yang-gb575a342017-07-13 09:47:27 -0700140 "//test/cpp/util:test_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100141 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800142)
143
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200144grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800145 name = "qps_json_driver",
146 srcs = ["qps_json_driver.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100147 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100148 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100149 ":driver_impl",
150 "//:grpc++",
Guantao Liuabe3cf52017-07-12 17:36:30 -0700151 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700152 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200153 ],
154 external_deps = [
155 "gflags",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100156 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800157)
158
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200159grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800160 name = "qps_openloop_test",
161 srcs = ["qps_openloop_test.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 ":qps_worker_impl",
yang-gb575a342017-07-13 09:47:27 -0700166 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700167 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100168 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800169)
170
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200171grpc_cc_test(
Craig Tiller3a488472017-02-17 14:35:26 -0800172 name = "secure_sync_unary_ping_pong_test",
173 srcs = ["secure_sync_unary_ping_pong_test.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100174 deps = [
Nicolas "Pixel" Nobleb02dd012017-03-24 18:45:22 +0100175 ":benchmark_config",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100176 ":driver_impl",
177 "//:grpc++",
yang-gb575a342017-07-13 09:47:27 -0700178 "//test/cpp/util:test_config",
Guantao Liuac9fdfb2017-07-14 17:33:19 -0700179 "//test/cpp/util:test_util",
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100180 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800181)
182
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200183grpc_cc_library(
Craig Tiller3a488472017-02-17 14:35:26 -0800184 name = "usage_timer",
185 srcs = ["usage_timer.cc"],
186 hdrs = ["usage_timer.h"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100187 deps = ["//:gpr"],
Craig Tiller3a488472017-02-17 14:35:26 -0800188)
189
Nicolas "Pixel" Noble7c26eed2017-04-13 01:40:54 +0200190grpc_cc_binary(
Craig Tiller3a488472017-02-17 14:35:26 -0800191 name = "qps_worker",
192 srcs = ["worker.cc"],
Nicolas "Pixel" Noble0a6d30b2017-03-22 00:51:51 +0100193 deps = [
194 ":qps_worker_impl",
195 "//:grpc++",
196 "//test/core/util:gpr_test_util",
197 "//test/core/util:grpc_test_util",
198 "//test/cpp/util:test_config",
199 "//test/cpp/util:test_util",
200 ],
Craig Tiller3a488472017-02-17 14:35:26 -0800201)