From 385614ba7fe9c1361dbd4687188265864fbf225c Mon Sep 17 00:00:00 2001 From: Holly Gong Date: Tue, 27 Aug 2024 14:23:21 +1000 Subject: [PATCH] enhance readability --- tools/api-performance-test/performance.py | 357 ++++++++++++++++------ tools/api-performance-test/poetry.lock | 152 ++++----- tools/api-performance-test/pyproject.toml | 2 +- 3 files changed, 350 insertions(+), 161 deletions(-) diff --git a/tools/api-performance-test/performance.py b/tools/api-performance-test/performance.py index f9a2cdd5099..c74cd177c58 100644 --- a/tools/api-performance-test/performance.py +++ b/tools/api-performance-test/performance.py @@ -1,12 +1,14 @@ #!/usr/bin/env python3 -"""Mock API queries and send them to the test API endpoint -for performance testing.""" +"""Mock API queries and send them to the test API endpoint for +performance testing. It is recommended to use two terminals to +run this script concurrently to generate sufficient traffic.""" +import aiohttp import asyncio import os import random +import sys import time -import aiohttp import json from google.cloud import ndb @@ -19,12 +21,16 @@ GCP_PROJECT = 'oss-vdb-test' BUG_DIR = './all_bugs' -# Number of vulnerability get requests to send per second -VULN_QUERY_BATCH_SIZE = 100 -VERSION_QUERY_BATCH_SIZE = 200 -PACKAGE_QUERY_BATCH_SIZE = 60 -BATCH_QUERY_BATCH_SIZE = 6 -LARGE_BATCH_QUERY_BATCH_SIZE = 4 +# Number of `vulnerability get` requests to send per second +VULN_QUERY_BATCH_SIZE = 50 +# Number of `version query` requests to send per second +VERSION_QUERY_BATCH_SIZE = 100 +# Number of `package query` requests to send per second +PACKAGE_QUERY_BATCH_SIZE = 30 +# Number of `batch query` requests to send per second +BATCH_QUERY_BATCH_SIZE = 3 +# Number of large `batch query` requests to send per second +LARGE_BATCH_QUERY_BATCH_SIZE = 2 class SimpleBug: @@ -33,11 +39,11 @@ class SimpleBug: def __init__(self, bug_dict): self.db_id = bug_dict['db_id'] - # If the project/ecosystem/version value is None, then add a fake value in. + # If the package/ecosystem/version value is None, then add a fake value in. if not bug_dict['project']: - self.projects = 'foo' + self.packages = 'foo' else: - self.projects = list(bug_dict['project']) + self.packages = list(bug_dict['project']) self.purl = bug_dict['purl'] if not bug_dict['ecosystem']: self.ecosystems = 'foo' @@ -51,8 +57,16 @@ def __init__(self, bug_dict): self.affected_fuzzy = '1.0.0' -def format_bug_for_output(bug): - """Outputs ndb bug query results to JSON file""" +def format_bug_for_output(bug) -> dict[str:any]: + """Outputs ndb bug query results to JSON file + + Args: + bug: an `osv.Bug` queried from ndb. + + Returns: + A dict storing all the important `Bug` fields that we want to use later + """ + affected_fuzzy = None # Store one version for use as the query version later. if len(bug.affected_fuzzy) > 0: @@ -68,9 +82,8 @@ def format_bug_for_output(bug): } -def get_bugs_from_datastore(): - """Gets all bugs from the datastore and write them to separate files in case - the query fails or times out.""" +def get_bugs_from_datastore() -> None: + """Gets all bugs from the datastore and writes to `BUG_DIR`.""" entries_per_file = 10000 # amount of bugs per file batch_size = 1000 @@ -78,7 +91,7 @@ def get_bugs_from_datastore(): os.makedirs(BUG_DIR, exist_ok=True) def write_to_json(): - # Write to a new JSON file + """Writes to a new JSON file.""" file_name = f'{BUG_DIR}/all_bugs_{file_counter}.json' with open(file_name, 'w+') as f: json.dump(results, f, indent=2) @@ -104,6 +117,7 @@ def write_to_json(): results.extend([format_bug_for_output(bug) for bug in bugs]) total_entries += len(bugs) + # Write bugs to separate files in case the query fails or times out. if total_entries >= entries_per_file: write_to_json() @@ -119,33 +133,76 @@ def write_to_json(): print(f'All results saved to {BUG_DIR}.') -def read_from_json(filename, ecosystem_map, bug_map, project_map): - """Reads one JSON file""" +def read_from_json(filename, ecosystem_map, bug_map, package_map) -> None: + """Loads bugs from one JSON file into bug dicts. + + Args: + filename: the JSON filename. + + ecosystem_map: + A defaultdict mapping ecosystem names to their bugs. For example: + {'Maven': (CVE-XXXX-XXXX, CVE-XXXX-XXXX), 'PyPI': ()} + + bug_map: + A dict mapping bug ID to its `SimpleBug` object. For example: + {'CVE-XXXX-XXXX,': SimpleBug{}} + + package_map: + A defaultdict mapping package names to their bugs. For example: + {'tensorflow': (CVE-XXXX-XXXX, CVE-XXXX-XXXX), 'curl': ()} + + Returns: + None + """ with open(filename, "r") as f: json_file = json.load(f) for bug_data in json_file: bug = SimpleBug(bug_data) for ecosystem in bug.ecosystems: ecosystem_map[ecosystem].add(bug.db_id) - for project in bug.projects: - project_map[project].add(bug.db_id) + for package in bug.packages: + package_map[package].add(bug.db_id) bug_map[bug.db_id] = bug -def load_all_bugs(directory_path): - """Loads bugs from JSON output""" +def load_all_bugs() -> tuple[defaultdict, dict, defaultdict]: + """Loads bugs from JSON directory + + Returns: + A defaultdict mapping ecosystem names to their bugs. For example: + {'Maven': (CVE-XXXX-XXXX, CVE-XXXX-XXXX), 'PyPI': ()} + + A dict mapping bug ID to its `SimpleBug` object. For example: + {'CVE-XXXX-XXXX,': SimpleBug{}} + + A defaultdict mapping package names to their bugs. For example: + {'tensorflow': (CVE-XXXX-XXXX, CVE-XXXX-XXXX), 'curl': ()} + """ + ecosystem_map = defaultdict(set) bug_map = {} - project_map = defaultdict(set) - for filename in os.listdir(directory_path): + package_map = defaultdict(set) + for filename in os.listdir(BUG_DIR): if filename.endswith('.json'): - file_path = os.path.join(directory_path, filename) - read_from_json(file_path, ecosystem_map, bug_map, project_map) - return ecosystem_map, bug_map, project_map - - -async def make_http_request(session, request_url, request_type, request_body): - """Makes one HTTP request""" + file_path = os.path.join(BUG_DIR, filename) + read_from_json(file_path, ecosystem_map, bug_map, package_map) + return ecosystem_map, bug_map, package_map + + +async def make_http_request(session, request_url, request_type, + request_body) -> None: + """Makes one HTTP request + + Args: + session: + The HTTP ClientSession + request_url: + The HTTP request URL + request_type: + The HTTP request type: `GET` or `POST` + request_body: + The HTTP request body in JSON format + """ try: timeout = aiohttp.ClientTimeout(total=None, sock_connect=80, sock_read=80) if request_type == 'GET': @@ -161,8 +218,22 @@ async def make_http_request(session, request_url, request_type, request_body): async def make_http_requests_async(request_ids, bug_map, url, batch_size, - payload_func): - """Makes the required number of HTTP requests per second.""" + payload_func) -> None: + """Makes the required number of HTTP requests per second async. + + Args: + request_ids: + A list of bug IDs + bug_map: + A dict mapping bug IDs to the corresponding `SimpleBug` objects + url: + The request URL + batch_size: + The number of requests to make per second + payload_func: + The payload function, such as `build_batch_payload` + """ + begin_time = time.monotonic() print(f'[{begin_time}] Running make request {payload_func.__name__} ' f'for {TOTAL_RUNTIME} seconds') @@ -175,12 +246,13 @@ async def make_http_requests_async(request_ids, bug_map, url, batch_size, start_time = time.monotonic() batch_request_ids = request_ids[index:batch_size + index] - if payload_func.__name__ == vulnerability_payload.__name__: + if payload_func.__name__ == build_vulnerability_payload.__name__: for request_id in batch_request_ids: + # OSV getting vulnerability detail is a GET request asyncio.create_task( make_http_request(session, f'{url}/{request_id}', 'GET', payload_func())) - elif payload_func.__name__ == batch_payload.__name__: + elif payload_func.__name__ == build_batch_payload.__name__: for _ in range(0, batch_size): asyncio.create_task( make_http_request(session, url, 'POST', @@ -201,16 +273,45 @@ async def make_http_requests_async(request_ids, bug_map, url, batch_size, total_run_time = time.monotonic() - begin_time -def package_payload(request_id, bug_map): - """package/project query payload""" - package = random.choice(bug_map[request_id].projects) +def build_vulnerability_payload() -> None: + """The vulnerability query doesn't need a request body""" + return None + + +def build_package_payload(request_id, bug_map) -> dict[str:any]: + """Builds a package query payload + + Args: + request_id: + The bug ID + bug_map: + A dict mapping bug IDs to the corresponding `SimpleBug` objects + + Returns: + A dict containing package query payload, example: + '"package": {"name": "mruby","ecosystem": "OSS-Fuzz"}}' + """ + + package = random.choice(bug_map[request_id].packages) ecosystem = random.choice(bug_map[request_id].ecosystems) return {"package": {"name": package, "ecosystem": ecosystem}} -def version_payload(request_id, bug_map): - """version query payload""" - package = random.choice(bug_map[request_id].projects) +def build_version_payload(request_id, bug_map) -> dict: + """Builds a version query payload + + Args: + request_id: + The bug ID + bug_map: + A dict mapping bug IDs to the corresponding `SimpleBug` objects + + Returns: + A dict containing package version query payload, example: + '{"package": { + "name": "mruby","ecosystem": "OSS-Fuzz"}, "version": "2.1.2rc"}' + """ + package = random.choice(bug_map[request_id].packages) ecosystem = random.choice(bug_map[request_id].ecosystems) return { "version": bug_map[request_id].affected_fuzzy, @@ -221,104 +322,188 @@ def version_payload(request_id, bug_map): } -def batch_payload(request_ids, bug_map): - """batch query payload""" +def build_batch_payload(request_ids, + bug_map) -> dict[str, list[dict[str, any]]]: + """Builds a batch query payload + + Args: + request_id: + The bug ID + bug_map: + A dict mapping bug IDs to the corresponding `SimpleBug` objects + + Returns: + A dict containing OSV batch query payload, example: + '{ + "queries": [ + { + "package": { + ... + }, + "version": ... + }, + { + "package": { + ... + }, + "version": ... + }, + ] + }' + """ size = random.randint(1, 100) batch_ids = random.sample(request_ids, min(size, len(request_ids))) queries = [] for bug_id in batch_ids: query = {} - query_type = random.choice(['version', 'project']) + query_type = random.choice(['version', 'package']) if query_type == 'version': - query = version_payload(bug_id, bug_map) - elif query_type == 'project': - query = package_payload(bug_id, bug_map) + query = build_version_payload(bug_id, bug_map) + elif query_type == 'package': + query = build_package_payload(bug_id, bug_map) queries.append(query) return {"queries": [queries]} -def vulnerability_payload(): - """vulnerability query doesn't need request body""" - return None - - -def get_large_batch_query(project_map): - """Gets packages with the most amount of vulns.""" +def get_large_batch_query(package_map) -> list[str]: + """Gets a list of bug IDs for large batch queries. + This list contains bug IDs from the packages with the high + number of vulnerabilities. + + Args: + request_id: + The bug ID + bug_map: + A dict mapping bug IDs to the corresponding `SimpleBug` objects + + Returns: + A dict containing OSV batch query payload, example: + '{ + "queries": [ + { + "package": { + ... + }, + "version": ... + }, + { + "package": { + ... + }, + "version": ... + }, + ] + }' + """ most_common = 5000 - project_counter = Counter() - for project in project_map: - # filter out invalid project name and Linux Kernel - if project in ('foo', 'Kernel'): + package_counter = Counter() + for package in package_map: + # filter out invalid package name and Linux Kernel + if package in ('foo', 'Kernel'): continue - project_counter[project] = len(project_map[project]) - most_vulnerable_projects = project_counter.most_common(most_common) + package_counter[package] = len(package_map[package]) + most_vulnerable_packages = package_counter.most_common(most_common) large_batch_query_ids = [] - for project, project_count in most_vulnerable_projects: - if project_count == 10: + for package, package_count in most_vulnerable_packages: + if package_count == 0: break - large_batch_query_ids.append(project_map[project].pop()) + large_batch_query_ids.append(package_map[package].pop()) random.shuffle(large_batch_query_ids) return large_batch_query_ids -async def send_version_requests(request_ids, bug_map): - """Sends version query requests""" +async def send_version_requests(request_ids, bug_map) -> None: + """Sends version query requests + + Args: + request_id: + The bug ID + bug_map: + A dict mapping bug IDs to the corresponding `SimpleBug` objects + """ + url = f'{BASE_URL}/query' batch_size = VERSION_QUERY_BATCH_SIZE await make_http_requests_async(request_ids, bug_map, url, batch_size, - version_payload) + build_version_payload) + +async def send_package_requests(request_ids, bug_map) -> None: + """Sends package query requests -async def send_package_requests(request_ids, bug_map): - """Sends package query requests""" + Args: + request_id: + The bug ID + bug_map: + A dict mapping bug IDs to the corresponding `SimpleBug` objects + """ url = f'{BASE_URL}/query' batch_size = PACKAGE_QUERY_BATCH_SIZE await make_http_requests_async(request_ids, bug_map, url, batch_size, - package_payload) + build_package_payload) -async def send_vuln_requests(request_ids, bug_map): - """Sends vulnerability get requests""" +async def send_vuln_requests(request_ids, bug_map) -> None: + """Sends vulnerability get requests + + Args: + request_id: + The bug ID + bug_map: + A dict mapping bug IDs to the corresponding `SimpleBug` objects + """ url = f'{BASE_URL}/vulns' batch_size = VULN_QUERY_BATCH_SIZE await make_http_requests_async(request_ids, bug_map, url, batch_size, - vulnerability_payload) + build_vulnerability_payload) + +async def send_batch_requests(request_ids, bug_map, batch_size) -> None: + """Sends batch query requests -async def send_batch_requests(request_ids, bug_map, batch_size): - """Sends batch query requests""" + Args: + request_id: + The bug ID + bug_map: + A dict mapping bug IDs to the corresponding `SimpleBug` objects + batch_size: + The batch query size + """ url = f'{BASE_URL}/querybatch' await make_http_requests_async(request_ids, bug_map, url, batch_size, - batch_payload) + build_batch_payload) -async def main(): - """Main""" +async def main() -> None: if not os.path.exists(BUG_DIR): # This will take around 10 mins get_bugs_from_datastore() + seed = random.randrange(sys.maxsize) + # The seed value can be replaced for debugging + random.seed(seed) + print(f'Random seed {seed}') # The `ecosystem_map` can be used to filter our queries for a # specific ecosystem. - ecosystem_map, bug_map, project_map = load_all_bugs(BUG_DIR) + ecosystem_map, bug_map, package_map = load_all_bugs() vuln_query_ids = list(bug_map.keys()) package_query_ids = [] - for project in project_map: - # Tests each project once. - package_query_ids.append(project_map[project].pop()) + for package in package_map: + # Tests each package once. + package_query_ids.append(package_map[package].pop()) random.shuffle(package_query_ids) random.shuffle(vuln_query_ids) print(f'It will send vulnerability get requests for {len(vuln_query_ids)} ' 'vulnerabilities.') print('It will send package/version/batch query requests for ' - f'{len(package_query_ids)} projects within ' + f'{len(package_query_ids)} packages within ' f'{len(ecosystem_map)} ecosystems.') - # Get all projects with the most frequently occurring number + # Get all packages with the most frequently occurring number # of vulnerabilities. - large_batch_query_ids = get_large_batch_query(project_map) + large_batch_query_ids = get_large_batch_query(package_map) await asyncio.gather( send_vuln_requests(vuln_query_ids, bug_map), diff --git a/tools/api-performance-test/poetry.lock b/tools/api-performance-test/poetry.lock index 544d7a5ded9..0e8f0edbefc 100644 --- a/tools/api-performance-test/poetry.lock +++ b/tools/api-performance-test/poetry.lock @@ -627,23 +627,23 @@ libcst = ["libcst (>=0.2.5)"] [[package]] name = "google-cloud-logging" -version = "3.11.1" +version = "3.11.2" description = "Stackdriver Logging API client library" optional = false python-versions = ">=3.7" files = [ - {file = "google_cloud_logging-3.11.1-py2.py3-none-any.whl", hash = "sha256:9b2403bce5e4faf30c8a8756f85529bb14a28991dd2cedde49c488dd56076a26"}, - {file = "google_cloud_logging-3.11.1.tar.gz", hash = "sha256:a70f33d17a70237ea8b63409e07dd14adaedec93fbf52550be4f51d347c67918"}, + {file = "google_cloud_logging-3.11.2-py2.py3-none-any.whl", hash = "sha256:0a755f04f184fbe77ad608258dc283a032485ebb4d0e2b2501964059ee9c898f"}, + {file = "google_cloud_logging-3.11.2.tar.gz", hash = "sha256:4897441c2b74f6eda9181c23a8817223b6145943314a821d64b729d30766cb2b"}, ] [package.dependencies] google-api-core = {version = ">=1.34.1,<2.0.dev0 || >=2.11.dev0,<3.0.0dev", extras = ["grpc"]} google-auth = ">=2.14.1,<2.24.0 || >2.24.0,<2.25.0 || >2.25.0,<3.0.0dev" -google-cloud-appengine-logging = ">=0.1.0,<2.0.0dev" -google-cloud-audit-log = ">=0.1.0,<1.0.0dev" +google-cloud-appengine-logging = ">=0.1.3,<2.0.0dev" +google-cloud-audit-log = ">=0.2.4,<1.0.0dev" google-cloud-core = ">=2.0.0,<3.0.0dev" grpc-google-iam-v1 = ">=0.12.4,<1.0.0dev" -opentelemetry-api = ">=1.0.0" +opentelemetry-api = ">=1.9.0" proto-plus = {version = ">=1.22.2,<2.0.0dev", markers = "python_version >= \"3.11\""} protobuf = ">=3.20.2,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0dev" @@ -789,13 +789,13 @@ requests = ["requests (>=2.18.0,<3.0.0dev)"] [[package]] name = "googleapis-common-protos" -version = "1.63.2" +version = "1.64.0" description = "Common protobufs used in Google APIs" optional = false python-versions = ">=3.7" files = [ - {file = "googleapis-common-protos-1.63.2.tar.gz", hash = "sha256:27c5abdffc4911f28101e635de1533fb4cfd2c37fbaa9174587c799fac90aa87"}, - {file = "googleapis_common_protos-1.63.2-py2.py3-none-any.whl", hash = "sha256:27a2499c7e8aff199665b22741997e485eccc8645aa9176c7c988e6fae507945"}, + {file = "googleapis_common_protos-1.64.0-py2.py3-none-any.whl", hash = "sha256:d1bfc569f70ed2e96ccf06ead265c2cf42b5abfc817cda392e3835f3b67b5c59"}, + {file = "googleapis_common_protos-1.64.0.tar.gz", hash = "sha256:7d77ca6b7c0c38eb6b1bab3b4c9973acf57ce4f2a6d3a4136acba10bcbfb3025"}, ] [package.dependencies] @@ -823,61 +823,61 @@ protobuf = ">=3.20.2,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4 [[package]] name = "grpcio" -version = "1.65.5" +version = "1.66.0" description = "HTTP/2-based RPC framework" optional = false python-versions = ">=3.8" files = [ - {file = "grpcio-1.65.5-cp310-cp310-linux_armv7l.whl", hash = "sha256:b67d450f1e008fedcd81e097a3a400a711d8be1a8b20f852a7b8a73fead50fe3"}, - {file = "grpcio-1.65.5-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:a70a20eed87bba647a38bedd93b3ce7db64b3f0e8e0952315237f7f5ca97b02d"}, - {file = "grpcio-1.65.5-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:f79c87c114bf37adf408026b9e2e333fe9ff31dfc9648f6f80776c513145c813"}, - {file = "grpcio-1.65.5-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f17f9fa2d947dbfaca01b3ab2c62eefa8240131fdc67b924eb42ce6032e3e5c1"}, - {file = "grpcio-1.65.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:32d60e18ff7c34fe3f6db3d35ad5c6dc99f5b43ff3982cb26fad4174462d10b1"}, - {file = "grpcio-1.65.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fe6505376f5b00bb008e4e1418152e3ad3d954b629da286c7913ff3cfc0ff740"}, - {file = "grpcio-1.65.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:33158e56c6378063923c417e9fbdb28660b6e0e2835af42e67f5a7793f587af7"}, - {file = "grpcio-1.65.5-cp310-cp310-win32.whl", hash = "sha256:1cbc208edb9acf1cc339396a1a36b83796939be52f34e591c90292045b579fbf"}, - {file = "grpcio-1.65.5-cp310-cp310-win_amd64.whl", hash = "sha256:bc74f3f745c37e2c5685c9d2a2d5a94de00f286963f5213f763ae137bf4f2358"}, - {file = "grpcio-1.65.5-cp311-cp311-linux_armv7l.whl", hash = "sha256:3207ae60d07e5282c134b6e02f9271a2cb523c6d7a346c6315211fe2bf8d61ed"}, - {file = "grpcio-1.65.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a2f80510f99f82d4eb825849c486df703f50652cea21c189eacc2b84f2bde764"}, - {file = "grpcio-1.65.5-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:a80e9a5e3f93c54f5eb82a3825ea1fc4965b2fa0026db2abfecb139a5c4ecdf1"}, - {file = "grpcio-1.65.5-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0b2944390a496567de9e70418f3742b477d85d8ca065afa90432edc91b4bb8ad"}, - {file = "grpcio-1.65.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3655139d7be213c32c79ef6fb2367cae28e56ef68e39b1961c43214b457f257"}, - {file = "grpcio-1.65.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:05f02d68fc720e085f061b704ee653b181e6d5abfe315daef085719728d3d1fd"}, - {file = "grpcio-1.65.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1c4caafe71aef4dabf53274bbf4affd6df651e9f80beedd6b8e08ff438ed3260"}, - {file = "grpcio-1.65.5-cp311-cp311-win32.whl", hash = "sha256:84c901cdec16a092099f251ef3360d15e29ef59772150fa261d94573612539b5"}, - {file = "grpcio-1.65.5-cp311-cp311-win_amd64.whl", hash = "sha256:11f8b16121768c1cb99d7dcb84e01510e60e6a206bf9123e134118802486f035"}, - {file = "grpcio-1.65.5-cp312-cp312-linux_armv7l.whl", hash = "sha256:ee6ed64a27588a2c94e8fa84fe8f3b5c89427d4d69c37690903d428ec61ca7e4"}, - {file = "grpcio-1.65.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:76991b7a6fb98630a3328839755181ce7c1aa2b1842aa085fd4198f0e5198960"}, - {file = "grpcio-1.65.5-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:89c00a18801b1ed9cc441e29b521c354725d4af38c127981f2c950c796a09b6e"}, - {file = "grpcio-1.65.5-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:078038e150a897e5e402ed3d57f1d31ebf604cbed80f595bd281b5da40762a92"}, - {file = "grpcio-1.65.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c97962720489ef31b5ad8a916e22bc31bba3664e063fb9f6702dce056d4aa61b"}, - {file = "grpcio-1.65.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:b8270b15b99781461b244f5c81d5c2bc9696ab9189fb5ff86c841417fb3b39fe"}, - {file = "grpcio-1.65.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8e5c4c15ac3fe1eb68e46bc51e66ad29be887479f231f8237cf8416058bf0cc1"}, - {file = "grpcio-1.65.5-cp312-cp312-win32.whl", hash = "sha256:f5b5970341359341d0e4c789da7568264b2a89cd976c05ea476036852b5950cd"}, - {file = "grpcio-1.65.5-cp312-cp312-win_amd64.whl", hash = "sha256:238a625f391a1b9f5f069bdc5930f4fd71b74426bea52196fc7b83f51fa97d34"}, - {file = "grpcio-1.65.5-cp38-cp38-linux_armv7l.whl", hash = "sha256:6c4e62bcf297a1568f627f39576dbfc27f1e5338a691c6dd5dd6b3979da51d1c"}, - {file = "grpcio-1.65.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:d7df567b67d16d4177835a68d3f767bbcbad04da9dfb52cbd19171f430c898bd"}, - {file = "grpcio-1.65.5-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:b7ca419f1462390851eec395b2089aad1e49546b52d4e2c972ceb76da69b10f8"}, - {file = "grpcio-1.65.5-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fa36dd8496d3af0d40165252a669fa4f6fd2db4b4026b9a9411cbf060b9d6a15"}, - {file = "grpcio-1.65.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a101696f9ece90a0829988ff72f1b1ea2358f3df035bdf6d675dd8b60c2c0894"}, - {file = "grpcio-1.65.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:2a6d8169812932feac514b420daffae8ab8e36f90f3122b94ae767e633296b17"}, - {file = "grpcio-1.65.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:47d0aaaab82823f0aa6adea5184350b46e2252e13a42a942db84da5b733f2e05"}, - {file = "grpcio-1.65.5-cp38-cp38-win32.whl", hash = "sha256:85ae8f8517d5bcc21fb07dbf791e94ed84cc28f84c903cdc2bd7eaeb437c8f45"}, - {file = "grpcio-1.65.5-cp38-cp38-win_amd64.whl", hash = "sha256:770bd4bd721961f6dd8049bc27338564ba8739913f77c0f381a9815e465ff965"}, - {file = "grpcio-1.65.5-cp39-cp39-linux_armv7l.whl", hash = "sha256:ab5ec837d8cee8dbce9ef6386125f119b231e4333cc6b6d57b6c5c7c82a72331"}, - {file = "grpcio-1.65.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:cabd706183ee08d8026a015af5819a0b3a8959bdc9d1f6fdacd1810f09200f2a"}, - {file = "grpcio-1.65.5-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:ec71fc5b39821ad7d80db7473c8f8c2910f3382f0ddadfbcfc2c6c437107eb67"}, - {file = "grpcio-1.65.5-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d3a9e35bcb045e39d7cac30464c285389b9a816ac2067e4884ad2c02e709ef8e"}, - {file = "grpcio-1.65.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d750e9330eb14236ca11b78d0c494eed13d6a95eb55472298f0e547c165ee324"}, - {file = "grpcio-1.65.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2b91ce647b6307f25650872454a4d02a2801f26a475f90d0b91ed8110baae589"}, - {file = "grpcio-1.65.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8da58ff80bc4556cf29bc03f5fff1f03b8387d6aaa7b852af9eb65b2cf833be4"}, - {file = "grpcio-1.65.5-cp39-cp39-win32.whl", hash = "sha256:7a412959aa5f08c5ac04aa7b7c3c041f5e4298cadd4fcc2acff195b56d185ebc"}, - {file = "grpcio-1.65.5-cp39-cp39-win_amd64.whl", hash = "sha256:55714ea852396ec9568f45f487639945ab674de83c12bea19d5ddbc3ae41ada3"}, - {file = "grpcio-1.65.5.tar.gz", hash = "sha256:ec6f219fb5d677a522b0deaf43cea6697b16f338cb68d009e30930c4aa0d2209"}, + {file = "grpcio-1.66.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:ad7256f224437b2c29c2bef98ddd3130454c5b1ab1f0471fc11794cefd4dbd3d"}, + {file = "grpcio-1.66.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:5f4b3357e59dfba9140a51597287297bc638710d6a163f99ee14efc19967a821"}, + {file = "grpcio-1.66.0-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:e8d20308eeae15b3e182f47876f05acbdec1eebd9473a9814a44e46ec4a84c04"}, + {file = "grpcio-1.66.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1eb03524d0f55b965d6c86aa44e5db9e5eaa15f9ed3b164621e652e5b927f4b8"}, + {file = "grpcio-1.66.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37514b68a42e9cf24536345d3cf9e580ffd29117c158b4eeea34625200256067"}, + {file = "grpcio-1.66.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:516fdbc8e156db71a004bc431a6303bca24cfde186babe96dde7bd01e8f0cc70"}, + {file = "grpcio-1.66.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d0439a970d65327de21c299ea0e0c2ad0987cdaf18ba5066621dea5f427f922b"}, + {file = "grpcio-1.66.0-cp310-cp310-win32.whl", hash = "sha256:5f93fc84b72bbc7b84a42f3ca9dc055fa00d2303d9803be011ebf7a10a4eb833"}, + {file = "grpcio-1.66.0-cp310-cp310-win_amd64.whl", hash = "sha256:8fc5c710ddd51b5a0dc36ef1b6663430aa620e0ce029b87b150dafd313b978c3"}, + {file = "grpcio-1.66.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:dd614370e939f9fceeeb2915111a0795271b4c11dfb5fc0f58449bee40c726a5"}, + {file = "grpcio-1.66.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:245b08f9b3c645a6a623f3ed4fa43dcfcd6ad701eb9c32511c1bb7380e8c3d23"}, + {file = "grpcio-1.66.0-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:aaf30c75cbaf30e561ca45f21eb1f729f0fab3f15c592c1074795ed43e3ff96f"}, + {file = "grpcio-1.66.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49234580a073ce7ac490112f6c67c874cbcb27804c4525978cdb21ba7f3f193c"}, + {file = "grpcio-1.66.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de9e20a0acb709dcfa15a622c91f584f12c9739a79c47999f73435d2b3cc8a3b"}, + {file = "grpcio-1.66.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:bc008c6afa1e7c8df99bd9154abc4f0470d26b7730ca2521122e99e771baa8c7"}, + {file = "grpcio-1.66.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:50cea8ce2552865b87e3dffbb85eb21e6b98d928621600c0feda2f02449cd837"}, + {file = "grpcio-1.66.0-cp311-cp311-win32.whl", hash = "sha256:508411df1f2b7cfa05d4d7dbf3d576fe4f949cd61c03f3a6f0378c84e3d7b963"}, + {file = "grpcio-1.66.0-cp311-cp311-win_amd64.whl", hash = "sha256:6d586a95c05c82a5354be48bb4537e1accaf2472d8eb7e9086d844cbff934482"}, + {file = "grpcio-1.66.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:5ea27f4ce8c0daccfdd2c7961e6ba404b6599f47c948415c4cca5728739107a3"}, + {file = "grpcio-1.66.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:296a45ea835e12a1cc35ab0c57e455346c272af7b0d178e29c67742167262b4c"}, + {file = "grpcio-1.66.0-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:e36fa838ac1d6c87198ca149cbfcc92e1af06bb8c8cd852622f8e58f33ea3324"}, + {file = "grpcio-1.66.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:684a4c07883cbd4ac864f0d08d927267404f5f0c76f31c85f9bbe05f2daae2f2"}, + {file = "grpcio-1.66.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3084e590e857ba7585ae91078e4c9b6ef55aaf1dc343ce26400ba59a146eada"}, + {file = "grpcio-1.66.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:526d4f6ca19f31b25606d5c470ecba55c0b22707b524e4de8987919e8920437d"}, + {file = "grpcio-1.66.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:423ae18637cd99ddcf2e5a6851c61828c49e9b9d022d0442d979b4f230109787"}, + {file = "grpcio-1.66.0-cp312-cp312-win32.whl", hash = "sha256:7bc9d823e05d63a87511fb456dcc48dc0fced86c282bf60229675e7ee7aac1a1"}, + {file = "grpcio-1.66.0-cp312-cp312-win_amd64.whl", hash = "sha256:230cdd696751e7eb1395718cd308234749daa217bb8d128f00357dc4df102558"}, + {file = "grpcio-1.66.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:0f3010bf46b2a01c9e40644cb9ed91b4b8435e5c500a275da5f9f62580e31e80"}, + {file = "grpcio-1.66.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ba18cfdc09312eb2eea6fa0ce5d2eec3cf345ea78f6528b2eaed6432105e0bd0"}, + {file = "grpcio-1.66.0-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:53d4c6706b49e358a2a33345dbe9b6b3bb047cecd7e8c07ba383bd09349bfef8"}, + {file = "grpcio-1.66.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:643d8d9632a688ae69661e924b862e23c83a3575b24e52917ec5bcc59543d212"}, + {file = "grpcio-1.66.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba60ae3b465b3e85080ae3bfbc36fd0305ae495ab16fcf8022fc7d7a23aac846"}, + {file = "grpcio-1.66.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:9d5251578767fe44602688c851c2373b5513048ac84c21a0fe946590a8e7933d"}, + {file = "grpcio-1.66.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5e8140b39f10d7be2263afa2838112de29374c5c740eb0afd99146cb5bdbd990"}, + {file = "grpcio-1.66.0-cp38-cp38-win32.whl", hash = "sha256:5b15ef1b296c4e78f15f64fc65bf8081f8774480ffcac45642f69d9d753d9c6b"}, + {file = "grpcio-1.66.0-cp38-cp38-win_amd64.whl", hash = "sha256:c072f90a1f0409f827ae86266984cba65e89c5831a0726b9fc7f4b5fb940b853"}, + {file = "grpcio-1.66.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:a639d3866bfb5a678b5c0b92cd7ab543033ed8988854290fd86145e71731fd4c"}, + {file = "grpcio-1.66.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6ed35bf7da3fb3b1949e32bdf47a8b5ffe0aed11722d948933bd068531cd4682"}, + {file = "grpcio-1.66.0-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:1c5466222470cb7fbc9cc898af1d48eefd297cb2e2f59af6d4a851c862fa90ac"}, + {file = "grpcio-1.66.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:921b8f7f25d5300d7c6837a1e0639ef145fbdbfb728e0a5db2dbccc9fc0fd891"}, + {file = "grpcio-1.66.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3f6feb0dc8456d025e566709f7dd02885add99bedaac50229013069242a1bfd"}, + {file = "grpcio-1.66.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:748452dbd5a047475d5413bdef08b0b9ceb2c0c0e249d4ee905a5fb82c6328dc"}, + {file = "grpcio-1.66.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:832945e64176520520317b50d64ec7d79924429528d5747669b52d0bf2c7bd78"}, + {file = "grpcio-1.66.0-cp39-cp39-win32.whl", hash = "sha256:8096a922eb91bc97c839f675c3efa1257c6ef181ae1b25d3fb97f2cae4c57c01"}, + {file = "grpcio-1.66.0-cp39-cp39-win_amd64.whl", hash = "sha256:375b58892301a5fc6ca7d7ff689c9dc9d00895f5d560604ace9f4f0573013c63"}, + {file = "grpcio-1.66.0.tar.gz", hash = "sha256:c1ea4c528e7db6660718e4165fd1b5ac24b79a70c870a7bc0b7bdb9babab7c1e"}, ] [package.extras] -protobuf = ["grpcio-tools (>=1.65.5)"] +protobuf = ["grpcio-tools (>=1.66.0)"] [[package]] name = "grpcio-status" @@ -897,24 +897,24 @@ protobuf = ">=4.21.6" [[package]] name = "idna" -version = "3.7" +version = "3.8" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" files = [ - {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, - {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, + {file = "idna-3.8-py3-none-any.whl", hash = "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac"}, + {file = "idna-3.8.tar.gz", hash = "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603"}, ] [[package]] name = "importlib-metadata" -version = "8.3.0" +version = "8.4.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-8.3.0-py3-none-any.whl", hash = "sha256:42817a4a0be5845d22c6e212db66a94ad261e2318d80b3e0d363894a79df2b67"}, - {file = "importlib_metadata-8.3.0.tar.gz", hash = "sha256:9c8fa6e8ea0f9516ad5c8db9246a731c948193c7754d3babb0114a05b27dd364"}, + {file = "importlib_metadata-8.4.0-py3-none-any.whl", hash = "sha256:66f342cc6ac9818fc6ff340576acd24d65ba0b3efabb2b4ac08b598965a4a2f1"}, + {file = "importlib_metadata-8.4.0.tar.gz", hash = "sha256:9a547d3bc3608b025f93d403fdd1aae741c24fbb8314df4b155675742ce303c5"}, ] [package.dependencies] @@ -1309,13 +1309,13 @@ files = [ [[package]] name = "pyparsing" -version = "3.1.2" +version = "3.1.4" description = "pyparsing module - Classes and methods to define and execute parsing grammars" optional = false python-versions = ">=3.6.8" files = [ - {file = "pyparsing-3.1.2-py3-none-any.whl", hash = "sha256:f9db75911801ed778fe61bb643079ff86601aca99fcae6345aa67292038fb742"}, - {file = "pyparsing-3.1.2.tar.gz", hash = "sha256:a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad"}, + {file = "pyparsing-3.1.4-py3-none-any.whl", hash = "sha256:a6a7ee4235a3f944aa1fa2249307708f893fe5717dc603503c6c7969c070fb7c"}, + {file = "pyparsing-3.1.4.tar.gz", hash = "sha256:f86ec8d1a83f11977c9a6ea7598e8c27fc5cddfa5b07ea2241edbbde1d7bc032"}, ] [package.extras] @@ -1587,13 +1587,13 @@ files = [ [[package]] name = "setuptools" -version = "73.0.0" +version = "73.0.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-73.0.0-py3-none-any.whl", hash = "sha256:f2bfcce7ae1784d90b04c57c2802e8649e1976530bb25dc72c2b078d3ecf4864"}, - {file = "setuptools-73.0.0.tar.gz", hash = "sha256:3c08705fadfc8c7c445cf4d98078f0fafb9225775b2b4e8447e40348f82597c0"}, + {file = "setuptools-73.0.1-py3-none-any.whl", hash = "sha256:b208925fcb9f7af924ed2dc04708ea89791e24bde0d3020b27df0e116088b34e"}, + {file = "setuptools-73.0.1.tar.gz", hash = "sha256:d59a3e788ab7e012ab2c4baed1b376da6366883ee20d7a5fc426816e3d7b1193"}, ] [package.extras] @@ -1840,18 +1840,22 @@ multidict = ">=4.0" [[package]] name = "zipp" -version = "3.20.0" +version = "3.20.1" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" files = [ - {file = "zipp-3.20.0-py3-none-any.whl", hash = "sha256:58da6168be89f0be59beb194da1250516fdaa062ccebd30127ac65d30045e10d"}, - {file = "zipp-3.20.0.tar.gz", hash = "sha256:0145e43d89664cfe1a2e533adc75adafed82fe2da404b4bbb6b026c0157bdb31"}, + {file = "zipp-3.20.1-py3-none-any.whl", hash = "sha256:9960cd8967c8f85a56f920d5d507274e74f9ff813a0ab8889a5b5be2daf44064"}, + {file = "zipp-3.20.1.tar.gz", hash = "sha256:c22b14cc4763c5a5b04134207736c107db42e9d3ef2d9779d465f5f1bcba572b"}, ] [package.extras] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] +enabler = ["pytest-enabler (>=2.2)"] +test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +type = ["pytest-mypy"] [metadata] lock-version = "2.0" diff --git a/tools/api-performance-test/pyproject.toml b/tools/api-performance-test/pyproject.toml index cb66718f872..e7f056edd99 100644 --- a/tools/api-performance-test/pyproject.toml +++ b/tools/api-performance-test/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -name = "api-perfomance-tester" +name = "api-perfomance-test" package-mode = false [tool.poetry.dependencies]