Skip to content

Commit 5f9f119

Browse files
committed
Clean up benchmarks python scripts.
Makes all scripts executable, cleans up unnecessary imports, add file name when dumping contents to log.
1 parent 9a6fc5c commit 5f9f119

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

tools/run_tests/performance/bq_upload_result.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
# Uploads performance benchmark result file to bigquery.
1717

18-
from __future__ import print_function
19-
2018
import argparse
2119
import calendar
2220
import json

tools/run_tests/performance/patch_scenario_results_schema.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,10 @@
1515

1616
# Use to patch schema of existing scenario results tables (after adding fields).
1717

18-
from __future__ import print_function
19-
2018
import argparse
21-
import calendar
2219
import json
2320
import os
2421
import sys
25-
import time
26-
import uuid
2722

2823
gcp_utils_dir = os.path.abspath(
2924
os.path.join(os.path.dirname(__file__), "../../gcp/utils")

tools/run_tests/performance/prometheus.py

100644100755
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python3
2-
32
# Copyright 2022 The gRPC Authors
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -320,7 +319,11 @@ def main() -> None:
320319
)
321320
processed_data["testDurationSeconds"] = float(end_time) - float(start_time)
322321

323-
logging.debug(json.dumps(processed_data, sort_keys=True, indent=4))
322+
logging.debug(
323+
"%s: %s",
324+
args.export_file_name,
325+
json.dumps(processed_data, sort_keys=True, indent=4),
326+
)
324327

325328
with open(args.export_file_name, "w", encoding="utf8") as export_file:
326329
json.dump(processed_data, export_file, sort_keys=True, indent=4)

tools/run_tests/performance/scenario_config.py

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python3
12
# Copyright 2016 gRPC authors.
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");

0 commit comments

Comments
 (0)