Permalink
Browse files

Added stream option to profile

  • Loading branch information...
1 parent 4ae4c90 commit 014f6f8139a992e07aa56508aa149e71c61b86b5 @fabianp committed Nov 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 memory_profiler.py
View
@@ -538,11 +538,11 @@ def magic_memit(self, line=''):
print('ERROR: could not read memory usage, try with a lower interval or more iterations')
-def profile(func):
+def profile(func, stream=None):
def wrapper(*args, **kwargs):
prof = LineProfiler()
val = prof(func)(*args, **kwargs)
- show_results(prof)
+ show_results(prof, stream=stream)
return val
return wrapper

0 comments on commit 014f6f8

Please sign in to comment.