BUILD 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
  15. grpc_package(name = "test/core/memory_usage")
  16. licenses(["notice"])
  17. grpc_cc_library(
  18. name = "memstats",
  19. testonly = 1,
  20. hdrs = ["memstats.h"],
  21. )
  22. grpc_cc_binary(
  23. name = "memory_usage_client",
  24. testonly = 1,
  25. srcs = ["client.cc"],
  26. external_deps = [
  27. "absl/flags:flag",
  28. "absl/flags:parse",
  29. ],
  30. tags = [
  31. "bazel_only",
  32. "no_mac",
  33. "no_windows",
  34. ],
  35. deps = [
  36. ":memstats",
  37. "//:gpr",
  38. "//:grpc",
  39. "//test/core/util:grpc_test_util",
  40. ],
  41. )
  42. grpc_cc_binary(
  43. name = "memory_usage_server",
  44. testonly = 1,
  45. srcs = ["server.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/end2end:ssl_test_data",
  60. "//test/core/util:grpc_test_util",
  61. ],
  62. )
  63. grpc_cc_test(
  64. name = "memory_usage_test",
  65. srcs = ["memory_usage_test.cc"],
  66. data = [
  67. ":memory_usage_client",
  68. ":memory_usage_server",
  69. ],
  70. external_deps = [
  71. "absl/flags:flag",
  72. "absl/flags:parse",
  73. ],
  74. language = "C++",
  75. tags = [
  76. "bazel_only",
  77. "no_mac",
  78. "no_windows",
  79. ],
  80. uses_polling = False,
  81. deps = [
  82. "//:gpr",
  83. "//:grpc",
  84. "//test/core/util:grpc_test_util",
  85. ],
  86. )