diff --git a/barretenberg/cpp/scripts/analyze_client_ivc_bench.py b/barretenberg/cpp/scripts/analyze_client_ivc_bench.py index f4e461e7233a..6425718c409b 100644 --- a/barretenberg/cpp/scripts/analyze_client_ivc_bench.py +++ b/barretenberg/cpp/scripts/analyze_client_ivc_bench.py @@ -32,8 +32,11 @@ sum_of_kept_times_ms = sum(float(time) for _, time in bench_components.items())/1e6 total_time_ms = bench["real_time"] -print(f'Total time accounted for: {sum_of_kept_times_ms:.0f}ms/{total_time_ms:.0f}ms = {sum_of_kept_times_ms/total_time_ms:.2%}') -print('breakdown:') +MAX_LABEL_LENGTH = max(len(label) for label in to_keep) +column = {"label":"label", "ms":"ms", "%":"% total"} +print(f"{column['label']:<{MAX_LABEL_LENGTH}}{column['ms']:>8} {column['%']:>8}") for key in to_keep: time_ms = bench[key]/1e6 - print(key, f"{time_ms: .0f}ms, {time_ms/total_time_ms: .2%}") \ No newline at end of file + print(f"{key:<{MAX_LABEL_LENGTH}}{time_ms:>8.0f} {time_ms/total_time_ms:>8.2%}") + +print(f'\nTotal time accounted for: {sum_of_kept_times_ms:.0f}ms/{total_time_ms:.0f}ms = {sum_of_kept_times_ms/total_time_ms:.2%}') \ No newline at end of file