| 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 |
|
| 15 |
package( |
| 16 |
default_testonly = 1, |
| 17 |
default_visibility = ["//visibility:public"], |
| 18 |
) |
| 19 |
|
| 20 |
py_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 |
|
| 29 |
py_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 |
|
| 42 |
py_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 |
|
| 52 |
py_library( |
| 53 |
name = "client_runner", |
| 54 |
srcs = ["client_runner.py"], |
| 55 |
srcs_version = "PY2AND3", |
| 56 |
) |
| 57 |
|
| 58 |
py_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/testing:benchmark_service_py_pb2_grpc", |
| 68 |
"//src/proto/grpc/testing:control_py_pb2", |
| 69 |
"//src/proto/grpc/testing:payloads_py_pb2", |
| 70 |
"//src/proto/grpc/testing:stats_py_pb2", |
| 71 |
"//src/proto/grpc/testing:worker_service_py_pb2_grpc", |
| 72 |
"//src/python/grpcio/grpc:grpcio", |
| 73 |
"//src/python/grpcio_tests/tests/unit:resources", |
| 74 |
"//src/python/grpcio_tests/tests/unit:test_common", |
| 75 |
], |
| 76 |
) |
| 77 |
|
| 78 |
py_binary( |
| 79 |
name = "qps_worker", |
| 80 |
srcs = ["qps_worker.py"], |
| 81 |
imports = ["../.."], |
| 82 |
srcs_version = "PY2AND3", |
| 83 |
deps = [ |
| 84 |
":worker_server", |
| 85 |
"//src/proto/grpc/testing:worker_service_py_pb2_grpc", |
| 86 |
"//src/python/grpcio/grpc:grpcio", |
| 87 |
"//src/python/grpcio_tests/tests/unit:test_common", |
| 88 |
], |
| 89 |
) |