From 154d77147cc7f7e1750bcdfebebdc7c9e8e205ad Mon Sep 17 00:00:00 2001 From: Boris Pavlovic Date: Thu, 2 Apr 2015 17:36:55 +0300 Subject: [PATCH] Root trace point should collect full duration of imports It's very simple to make root point collect duration of all operation this change does this --- profimp/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profimp/main.py b/profimp/main.py index 54fec5d..85d62d4 100644 --- a/profimp/main.py +++ b/profimp/main.py @@ -47,7 +47,8 @@ def print_help(): def trace_module(import_line): root_pt = tracer.init_stack() with tracer.patch_import(): - exec(import_line) + with root_pt: + exec(import_line) return root_pt