From fc1ecc6e54f4bc406f872f22f492b52c5baba4f0 Mon Sep 17 00:00:00 2001 From: Richard Plangger Date: Mon, 24 Apr 2017 10:24:39 -0400 Subject: [PATCH] print a more verbose error message if the profile is empty --- vmprof/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmprof/cli.py b/vmprof/cli.py index 0568bd28..086ab4d4 100644 --- a/vmprof/cli.py +++ b/vmprof/cli.py @@ -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)