Skip to content

Commit 60c1919

Browse files
committed
test: measure time for one file to get a sense of much NOGIL is helping
1 parent 251fdf1 commit 60c1919

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fitsio/tests/test_threading.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ def read_file(i):
3333
with fitsio.FITS(fname, 'r') as fits:
3434
assert (fits[0].read() == i).all()
3535

36+
t0 = time.time()
37+
create_file(0)
38+
read_file(0)
39+
t0_one = time.time() - t0
40+
print("one file time:", t0_one, flush=True)
41+
3642
t0 = time.time()
3743
with ThreadPool(32) as pool:
3844
pool.map(create_file, range(32))

0 commit comments

Comments
 (0)