1# Copyright 2019 The 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 15package( 16 default_testonly = 1, 17 default_visibility = ["//visibility:public"], 18) 19 20py_library( 21 name = "benchmark_client", 22 srcs = ["benchmark_client.py"], 23 srcs_version = "PY3", 24 deps = [ 25 "//src/proto/grpc/testing:benchmark_service_py_pb2_grpc", 26 "//src/proto/grpc/testing:py_messages_proto", 27 "//src/python/grpcio/grpc:grpcio", 28 "//src/python/grpcio_tests/tests/qps:histogram", 29 "//src/python/grpcio_tests/tests/unit:resources", 30 ], 31) 32 33py_library( 34 name = "benchmark_servicer", 35 srcs = ["benchmark_servicer.py"], 36 srcs_version = "PY3", 37 deps = [ 38 "//src/proto/grpc/testing:benchmark_service_py_pb2_grpc", 39 "//src/proto/grpc/testing:py_messages_proto", 40 "//src/python/grpcio/grpc:grpcio", 41 ], 42) 43 44py_library( 45 name = "worker_servicer", 46 srcs = ["worker_servicer.py"], 47 data = [ 48 "//src/python/grpcio_tests/tests/unit/credentials", 49 ], 50 srcs_version = "PY3", 51 deps = [ 52 ":benchmark_client", 53 ":benchmark_servicer", 54 "//src/proto/grpc/testing:benchmark_service_py_pb2_grpc", 55 "//src/proto/grpc/testing:control_py_pb2", 56 "//src/proto/grpc/testing:payloads_py_pb2", 57 "//src/proto/grpc/testing:stats_py_pb2", 58 "//src/proto/grpc/testing:worker_service_py_pb2_grpc", 59 "//src/python/grpcio/grpc:grpcio", 60 "//src/python/grpcio_tests/tests/qps:histogram", 61 "//src/python/grpcio_tests/tests/unit:resources", 62 "//src/python/grpcio_tests/tests/unit/framework/common", 63 ], 64) 65 66py_binary( 67 name = "server", 68 srcs = ["server.py"], 69 python_version = "PY3", 70 deps = [":benchmark_servicer"], 71) 72 73py_binary( 74 name = "worker", 75 srcs = ["worker.py"], 76 imports = ["../../"], 77 python_version = "PY3", 78 deps = [ 79 ":worker_servicer", 80 "//src/proto/grpc/testing:worker_service_py_pb2_grpc", 81 ], 82) 83