From 519c9dab2513e81ab697d90b1a7aac8d09e70faf Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Tue, 2 Jan 2024 16:46:26 -0800 Subject: [PATCH 1/2] Fix formatting string in benchmark pretty printer Test: th Change-Id: I960cfdb897ed140b90caa765b1be6892d2ed208e --- tools/perf/format_benchmarks | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/perf/format_benchmarks b/tools/perf/format_benchmarks index c01aa76214..845d73fe62 100755 --- a/tools/perf/format_benchmarks +++ b/tools/perf/format_benchmarks @@ -73,14 +73,6 @@ def LoadSummary(filename): # Rows: # Benchmark -@dataclasses.dataclass(frozen=True) -class Key(): - pass - -class Column(): - def __init__(self): - pass - def lunch_str(d): "Convert a lunch dict to a string" return f"{d['TARGET_PRODUCT']}-{d['TARGET_RELEASE']}-{d['TARGET_BUILD_VARIANT']}" @@ -186,7 +178,7 @@ def main(argv): for key, column in summary["columns"]: for id, cell in column: duration_ns = statistics.median([b["duration_ns"] for b in cell]) - table.Set(tuple([summary["date"].strftime("YYYY-MM-DD"), + table.Set(tuple([summary["date"].strftime("%Y-%m-%d"), summary["branch"], summary["tag"]] + list(key)), From 7eba158c59a56fe0c0194be6daf2928619097409 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Wed, 3 Jan 2024 10:28:41 -0800 Subject: [PATCH 2/2] Skip metrics upload when doing benchmarks. metrics-uploader runs asynchronously, and causes a race condition where the out dir can't be deleted because metrics uploader is busy in it. Has the side effect of not polluting the local developer metrics with benchmark runs too. Test: treehugger Change-Id: I7953020cd9c69fb10745facd22648f931fc94477 --- tools/perf/benchmarks | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/benchmarks b/tools/perf/benchmarks index df4c87b3b2..e188858a25 100755 --- a/tools/perf/benchmarks +++ b/tools/perf/benchmarks @@ -335,6 +335,7 @@ class Runner(): "--build-mode", "--all-modules", f"--dir={self._options.root}", + "--skip-metrics-upload", ] + modules env = dict(os.environ) env["TARGET_PRODUCT"] = lunch.target_product