Skip to content

Commit

Permalink
print a more verbose error message if the profile is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
planrich committed Apr 24, 2017
1 parent e887a6a commit fc1ecc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vmprof/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def get_option(self, name, type, default=None):
def show(stats):
p = stats.top_profile()
if not p:
print("no stats")
print("No stats, profile is empty!\nDid you program run long enough (more than 1 second)?")
return

p.sort(key=lambda x: x[1], reverse=True)
Expand Down

0 comments on commit fc1ecc6

Please # to comment.