Progress display and summary formatting improved.
This commit is contained in:
@@ -102,7 +102,7 @@ def run_benchmark(args):
|
|||||||
)
|
)
|
||||||
bench_file.unlink()
|
bench_file.unlink()
|
||||||
|
|
||||||
length = args.len or "128MiB"
|
length = args.len or "1G"
|
||||||
max_threads = args.threads if args.threads is not None else os.cpu_count()
|
max_threads = args.threads if args.threads is not None else os.cpu_count()
|
||||||
|
|
||||||
all_results = {}
|
all_results = {}
|
||||||
|
|||||||
+7
-7
@@ -181,7 +181,7 @@ def format_worker_stats_report(
|
|||||||
return "No worker stats available"
|
return "No worker stats available"
|
||||||
|
|
||||||
def ms(val: float) -> str:
|
def ms(val: float) -> str:
|
||||||
return f"{val * 1000:.0f}"
|
return f"{val * 1000:.0f} ms"
|
||||||
|
|
||||||
# Column width for worker data
|
# Column width for worker data
|
||||||
col_w = 8
|
col_w = 8
|
||||||
@@ -216,33 +216,33 @@ def format_worker_stats_report(
|
|||||||
# Timing rows with summed values for percentage
|
# Timing rows with summed values for percentage
|
||||||
timing_rows = [
|
timing_rows = [
|
||||||
(
|
(
|
||||||
"crypto ms",
|
"crypto",
|
||||||
sum(s.crypto_time for s in worker_stats),
|
sum(s.crypto_time for s in worker_stats),
|
||||||
[ms(s.crypto_time) for s in worker_stats],
|
[ms(s.crypto_time) for s in worker_stats],
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"lock_acq ms",
|
"lock_acq",
|
||||||
sum(s.lock_acquire_time for s in worker_stats),
|
sum(s.lock_acquire_time for s in worker_stats),
|
||||||
[ms(s.lock_acquire_time) for s in worker_stats],
|
[ms(s.lock_acquire_time) for s in worker_stats],
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"wait_sp ms",
|
"wait_sp",
|
||||||
sum(s.lock_wait_space_time for s in worker_stats),
|
sum(s.lock_wait_space_time for s in worker_stats),
|
||||||
[ms(s.lock_wait_space_time) for s in worker_stats],
|
[ms(s.lock_wait_space_time) for s in worker_stats],
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"claim ms",
|
"claim",
|
||||||
sum(s.lock_claim_time for s in worker_stats),
|
sum(s.lock_claim_time for s in worker_stats),
|
||||||
[ms(s.lock_claim_time) for s in worker_stats],
|
[ms(s.lock_claim_time) for s in worker_stats],
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"notify ms",
|
"notify",
|
||||||
sum(s.lock_notify_time for s in worker_stats),
|
sum(s.lock_notify_time for s in worker_stats),
|
||||||
[ms(s.lock_notify_time) for s in worker_stats],
|
[ms(s.lock_notify_time) for s in worker_stats],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
timing_rows.append(("total ms", total_all, [ms(s.total_time()) for s in worker_stats]))
|
timing_rows.append(("total", total_all, [ms(s.total_time()) for s in worker_stats]))
|
||||||
|
|
||||||
lines = [header, sep]
|
lines = [header, sep]
|
||||||
for label, pct_val, values in counter_rows:
|
for label, pct_val, values in counter_rows:
|
||||||
|
|||||||
Reference in New Issue
Block a user