Skip to content

Commit 59caa93

Browse files
committed
Add igzip reader profiler
1 parent 72231f4 commit 59caa93

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

profile_igzipreader.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import cProfile
2+
import sys
3+
4+
from isal import igzip
5+
6+
7+
def main():
8+
with igzip.open(sys.argv[1], mode="rb") as gzip_h:
9+
while True:
10+
block = gzip_h.read(32*1024)
11+
if block == b"":
12+
return
13+
14+
15+
if __name__ == "__main__":
16+
cProfile.run("main()")

0 commit comments

Comments
 (0)