mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
add units to bench_cffi_access.py output
This commit is contained in:
parent
1f7e67ca02
commit
56a795c8dd
|
@ -28,7 +28,7 @@ def timer(func, label, *args):
|
||||||
func(*args)
|
func(*args)
|
||||||
if time.time() - starttime > 10:
|
if time.time() - starttime > 10:
|
||||||
print(
|
print(
|
||||||
"{}: breaking at {} iterations, {:.6f} per iteration".format(
|
"{}: breaking at {} iterations, {:.6f}s per iteration".format(
|
||||||
label, x + 1, (time.time() - starttime) / (x + 1.0)
|
label, x + 1, (time.time() - starttime) / (x + 1.0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -36,7 +36,7 @@ def timer(func, label, *args):
|
||||||
if x == iterations - 1:
|
if x == iterations - 1:
|
||||||
endtime = time.time()
|
endtime = time.time()
|
||||||
print(
|
print(
|
||||||
"{}: {:.4f} s {:.6f} per iteration".format(
|
"{}: {:.4f}s total, {:.6f}s per iteration".format(
|
||||||
label, endtime - starttime, (endtime - starttime) / (x + 1.0)
|
label, endtime - starttime, (endtime - starttime) / (x + 1.0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user