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 15licenses(["notice"]) # Apache v2 16 17load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary", "grpc_package") 18 19grpc_package(name = "test/cpp/microbenchmarks") 20 21grpc_cc_test( 22 name = "noop-benchmark", 23 srcs = ["noop-benchmark.cc"], 24 external_deps = [ 25 "benchmark", 26 ], 27 deps = ["//test/core/util:gpr_test_util",] 28) 29 30grpc_cc_library( 31 name = "helpers", 32 testonly = 1, 33 srcs = ["helpers.cc"], 34 hdrs = [ 35 "fullstack_context_mutators.h", 36 "fullstack_fixtures.h", 37 "helpers.h", 38 ], 39 external_deps = [ 40 "benchmark", 41 ], 42 deps = [ 43 "//:grpc++_unsecure", 44 "//src/proto/grpc/testing:echo_proto", 45 "//test/core/util:grpc_test_util_unsecure", 46 "//test/cpp/util:test_config", 47 ], 48) 49 50grpc_cc_binary( 51 name = "bm_closure", 52 testonly = 1, 53 srcs = ["bm_closure.cc"], 54 deps = [":helpers"], 55) 56 57grpc_cc_binary( 58 name = "bm_arena", 59 testonly = 1, 60 srcs = ["bm_arena.cc"], 61 deps = [":helpers"], 62) 63 64grpc_cc_binary( 65 name = "bm_channel", 66 testonly = 1, 67 srcs = ["bm_channel.cc"], 68 deps = [":helpers"], 69) 70 71grpc_cc_binary( 72 name = "bm_cq", 73 testonly = 1, 74 srcs = ["bm_cq.cc"], 75 deps = [":helpers"], 76) 77 78grpc_cc_binary( 79 name = "bm_cq_multiple_threads", 80 testonly = 1, 81 srcs = ["bm_cq_multiple_threads.cc"], 82 deps = [":helpers"], 83) 84 85grpc_cc_binary( 86 name = "bm_error", 87 testonly = 1, 88 srcs = ["bm_error.cc"], 89 deps = [":helpers"], 90) 91 92grpc_cc_library( 93 name = "fullstack_streaming_ping_pong_h", 94 testonly = 1, 95 hdrs = [ 96 "fullstack_streaming_ping_pong.h", 97 ], 98 deps = [":helpers"], 99) 100 101grpc_cc_binary( 102 name = "bm_fullstack_streaming_ping_pong", 103 testonly = 1, 104 srcs = [ 105 "bm_fullstack_streaming_ping_pong.cc", 106 ], 107 deps = [":fullstack_streaming_ping_pong_h"], 108) 109 110grpc_cc_library( 111 name = "fullstack_streaming_pump_h", 112 testonly = 1, 113 hdrs = [ 114 "fullstack_streaming_pump.h", 115 ], 116 deps = [":helpers"], 117) 118 119grpc_cc_binary( 120 name = "bm_fullstack_streaming_pump", 121 testonly = 1, 122 srcs = [ 123 "bm_fullstack_streaming_pump.cc", 124 ], 125 deps = [":fullstack_streaming_pump_h"], 126) 127 128grpc_cc_binary( 129 name = "bm_fullstack_trickle", 130 testonly = 1, 131 srcs = ["bm_fullstack_trickle.cc"], 132 deps = [":helpers"], 133) 134 135grpc_cc_library( 136 name = "fullstack_unary_ping_pong_h", 137 testonly = 1, 138 hdrs = [ 139 "fullstack_unary_ping_pong.h", 140 ], 141 deps = [":helpers"], 142) 143 144grpc_cc_binary( 145 name = "bm_fullstack_unary_ping_pong", 146 testonly = 1, 147 srcs = [ 148 "bm_fullstack_unary_ping_pong.cc", 149 ], 150 deps = [":fullstack_unary_ping_pong_h"], 151) 152 153grpc_cc_binary( 154 name = "bm_metadata", 155 testonly = 1, 156 srcs = ["bm_metadata.cc"], 157 deps = [":helpers"], 158) 159 160grpc_cc_binary( 161 name = "bm_chttp2_hpack", 162 testonly = 1, 163 srcs = ["bm_chttp2_hpack.cc"], 164 deps = [":helpers"], 165) 166 167grpc_cc_binary( 168 name = "bm_opencensus_plugin", 169 testonly = 1, 170 srcs = ["bm_opencensus_plugin.cc"], 171 language = "C++", 172 deps = [ 173 ":helpers", 174 "//:grpc_opencensus_plugin", 175 "//src/proto/grpc/testing:echo_proto", 176 ], 177) 178