Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
fix qa
Browse files Browse the repository at this point in the history
  • Loading branch information
floriankrb committed Dec 8, 2023
1 parent 3a7eb54 commit 661d6ed
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/speed-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import random
import time

from tqdm import tqdm

from ecml_tools.data import open_dataset

VERSION = 1
Expand Down Expand Up @@ -83,7 +81,10 @@ def show(start, count, bytes=""):
bytes = bytes / (end - start)
bytes = "(" + to_human_readable_bytes(bytes) + "/s)"
print(
f"Opening {count} items took {to_human_readable(end - start)}. Items per seconds: {count / (end - start) :.2f} {bytes}"
(
f"Opening {count} items took {to_human_readable(end - start)}."
"Items per seconds: {count / (end - start) :.2f} {bytes}"
)
)

start = time.time()
Expand All @@ -107,7 +108,10 @@ def process_item(ind):

print()
print(
f"Each item has shape {shape} and dtype {dtype}, total {size} values, total {to_human_readable_bytes(size_bytes)}"
(
f"Each item has shape {shape} and dtype {dtype}, total {size} values,"
"total {to_human_readable_bytes(size_bytes)}"
)
)
print("Speed test version:", VERSION)
show(start, args.count, bytes=size_bytes * args.count)
Expand Down

0 comments on commit 661d6ed

Please sign in to comment.