Author: Maciej Fijalkowski <[email protected]>
Branch: vmprof
Changeset: r76662:1e07ae277422
Date: 2015-03-31 16:52 +0200
http://bitbucket.org/pypy/pypy/changeset/1e07ae277422/
Log: automatically gzip the output here
diff --git a/rpython/bin/rpython-vmprof b/rpython/bin/rpython-vmprof
--- a/rpython/bin/rpython-vmprof
+++ b/rpython/bin/rpython-vmprof
@@ -17,11 +17,12 @@
print __doc__
sys.exit(1)
-import _vmprof
-x = open("vmprof.log", "w")
-_vmprof.enable(x.fileno(), 1000)
+import _vmprof, subprocess
+x = subprocess.Popen('gzip > vmprof.log.gz', shell=True, stdin=subprocess.PIPE)
+_vmprof.enable(x.stdin.fileno(), 1000)
try:
main()
finally:
_vmprof.disable()
- x.close()
+ x.stdin.close()
+ x.wait()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit