1# Copyright 2020 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 = "histogram", 22 srcs = ["histogram.py"], 23 srcs_version = "PY2AND3", 24 deps = [ 25 "//src/proto/grpc/testing:stats_py_pb2", 26 ], 27) 28 29py_library( 30 name = "benchmark_client", 31 srcs = ["benchmark_client.py"], 32 srcs_version = "PY2AND3", 33 deps = [ 34 "//src/proto/grpc/testing:benchmark_service_py_pb2_grpc", 35 "//src/proto/grpc/testing:py_messages_proto", 36 "//src/python/grpcio/grpc:grpcio", 37 "//src/python/grpcio_tests/tests/unit:resources", 38 "//src/python/grpcio_tests/tests/unit:test_common", 39 ], 40) 41 42py_library( 43 name = "benchmark_server", 44 srcs = ["benchmark_server.py"], 45 srcs_version = "PY2AND3", 46 deps = [ 47 "//src/proto/grpc/testing:benchmark_service_py_pb2_grpc", 48 "//src/proto/grpc/testing:py_messages_proto", 49 ], 50) 51 52py_library( 53 name = "client_runner", 54 srcs = ["client_runner.py"], 55 srcs_version = "PY2AND3", 56) 57 58py_library( 59 name = "worker_server", 60 srcs = ["worker_server.py"], 61 srcs_version = "PY2AND3", 62 deps = [ 63 ":benchmark_client", 64 ":benchmark_server", 65 ":client_runner", 66 ":histogram", 67 "//src/proto/grpc/core:stats_py_pb2", 68 "//src/proto/grpc/testing:benchmark_service_py_pb2_grpc", 69 "//src/proto/grpc/testing:control_py_pb2", 70 "//src/proto/grpc/testing:payloads_py_pb2", 71 "//src/proto/grpc/testing:stats_py_pb2", 72 "//src/proto/grpc/testing:worker_service_py_pb2_grpc", 73 "//src/python/grpcio/grpc:grpcio", 74 "//src/python/grpcio_tests/tests/unit:resources", 75 "//src/python/grpcio_tests/tests/unit:test_common", 76 ], 77) 78 79py_binary( 80 name = "qps_worker", 81 srcs = ["qps_worker.py"], 82 imports = ["../.."], 83 srcs_version = "PY2AND3", 84 deps = [ 85 ":worker_server", 86 "//src/proto/grpc/testing:worker_service_py_pb2_grpc", 87 "//src/python/grpcio/grpc:grpcio", 88 "//src/python/grpcio_tests/tests/unit:test_common", 89 ], 90) 91