Debian Codegraph @

test/core/memory_usage/BUILD

raw
1 # Copyright 2017 gRPC authors.
2 #
3 # 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
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # 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.
14
15 load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
16
17 grpc_package(name = "test/core/memory_usage")
18
19 licenses(["notice"])
20
21 grpc_cc_library(
22 name = "memstats",
23 testonly = 1,
24 srcs = [
25 "memstats.cc",
26 "memstats.h",
27 ],
28 hdrs = ["memstats.h"],
29 external_deps = [
30 "absl/types:optional",
31 ],
32 tags = [
33 "bazel_only",
34 "no_mac",
35 "no_windows",
36 ],
37 deps = [
38 "//:gpr",
39 ],
40 )
41
42 grpc_cc_binary(
43 name = "memory_usage_client",
44 testonly = 1,
45 srcs = ["client.cc"],
46 external_deps = [
47 "absl/flags:flag",
48 "absl/flags:parse",
49 ],
50 tags = [
51 "bazel_only",
52 "no_mac",
53 "no_windows",
54 ],
55 deps = [
56 ":memstats",
57 "//:gpr",
58 "//:grpc",
59 "//test/core/util:grpc_test_util",
60 "//test/core/util:grpc_test_util_base",
61 ],
62 )
63
64 grpc_cc_binary(
65 name = "memory_usage_server",
66 testonly = 1,
67 srcs = ["server.cc"],
68 external_deps = [
69 "absl/flags:flag",
70 "absl/flags:parse",
71 ],
72 tags = [
73 "bazel_only",
74 "no_mac",
75 "no_windows",
76 ],
77 deps = [
78 ":memstats",
79 "//:gpr",
80 "//:grpc",
81 "//test/core/end2end:ssl_test_data",
82 "//test/core/util:grpc_test_util",
83 "//test/core/util:grpc_test_util_base",
84 ],
85 )
86
87 grpc_cc_binary(
88 name = "memory_usage_callback_client",
89 testonly = 1,
90 srcs = ["callback_client.cc"],
91 external_deps = [
92 "absl/flags:flag",
93 "absl/flags:parse",
94 "absl/time",
95 "gtest",
96 ],
97 tags = [
98 "bazel_only",
99 "no_mac",
100 "no_windows",
101 ],
102 deps = [
103 ":memstats",
104 "//:gpr",
105 "//:grpc",
106 "//:grpc++",
107 "//src/proto/grpc/testing:benchmark_service_proto",
108 "//test/core/end2end:ssl_test_data",
109 "//test/core/util:grpc_test_util",
110 "//test/core/util:grpc_test_util_base",
111 ],
112 )
113
114 grpc_cc_binary(
115 name = "memory_usage_callback_server",
116 testonly = 1,
117 srcs = ["callback_server.cc"],
118 external_deps = [
119 "absl/flags:flag",
120 "absl/flags:parse",
121 "gtest",
122 ],
123 tags = [
124 "bazel_only",
125 "no_mac",
126 "no_windows",
127 ],
128 deps = [
129 ":memstats",
130 "//:gpr",
131 "//:grpc",
132 "//:grpc++",
133 "//src/proto/grpc/testing:benchmark_service_proto",
134 "//test/core/end2end:ssl_test_data",
135 "//test/core/util:grpc_test_util",
136 "//test/core/util:grpc_test_util_base",
137 ],
138 )
139
140 grpc_cc_test(
141 name = "memory_usage_test",
142 srcs = ["memory_usage_test.cc"],
143 data = [
144 ":memory_usage_callback_client",
145 ":memory_usage_callback_server",
146 ":memory_usage_client",
147 ":memory_usage_server",
148 ],
149 external_deps = [
150 "absl/algorithm:container",
151 "absl/flags:flag",
152 "absl/flags:parse",
153 ],
154 language = "C++",
155 tags = [
156 "bazel_only",
157 "no_mac",
158 "no_windows",
159 ],
160 uses_event_engine = False,
161 uses_polling = False,
162 deps = [
163 "//:gpr",
164 "//:grpc",
165 "//test/core/util:grpc_test_util",
166 "//test/core/util:grpc_test_util_base",
167 ],
168 )