Skip to content

Commit 94fb30a

Browse files
committed
perf: remove redundant asyncio lock in read microbenchmarks
1 parent d35e824 commit 94fb30a

File tree

1 file changed

+1
-3
lines changed
  • packages/google-cloud-storage/tests/perf/microbenchmarks/time_based/reads

1 file changed

+1
-3
lines changed

packages/google-cloud-storage/tests/perf/microbenchmarks/time_based/reads/test_reads.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ async def _download_time_based_async(client, filename, params):
118118
mrd = AsyncMultiRangeDownloader(client, params.bucket_name, filename)
119119
await mrd.open()
120120

121-
shared_lock = asyncio.Lock()
122-
123121
async def _worker_coro():
124122
total_bytes_downloaded = 0
125123
offset = 0
@@ -148,7 +146,7 @@ async def _worker_coro():
148146
if offset + params.chunk_size_bytes > params.file_size_bytes:
149147
offset = 0 # Reset offset if end of file is reached
150148

151-
await mrd.download_ranges(ranges, lock=shared_lock)
149+
await mrd.download_ranges(ranges)
152150

153151
bytes_in_buffers = sum(r[2].getbuffer().nbytes for r in ranges)
154152
assert bytes_in_buffers == params.chunk_size_bytes * params.num_ranges

0 commit comments

Comments
 (0)