Skip to content

Commit

Permalink
Merge pull request #25 from elpres/master
Browse files Browse the repository at this point in the history
Allow context manager invocation to suppress output
  • Loading branch information
durin42 committed Oct 15, 2015
2 parents 52a6a7a + 8086b52 commit 1a33eba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions statprof.py
Expand Up @@ -286,13 +286,14 @@ def reset(frequency=None):


@contextmanager
def profile():
def profile(verbose=True):
start()
try:
yield
finally:
stop()
display()
if verbose:
display()


###########################################################################
Expand Down

0 comments on commit 1a33eba

Please sign in to comment.