def _profile_module(self):
with open(self._run_object, '<STR_LIT:rb>') as srcfile, _StatProfiler() as prof:<EOL><INDENT>code = compile(srcfile.read(), self._run_object, '<STR_LIT>')<EOL>prof.base_frame = inspect.currentframe()<EOL>try:<EOL><INDENT>exec(code, self._globs, None)<EOL><DEDENT>except SystemExit:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>call_tree = prof.call_tree<EOL>return {<EOL>'<STR_LIT>': self._object_name,<EOL>'<STR_LIT>': _SAMPLE_INTERVAL,<EOL>'<STR_LIT>': prof.run_time,<EOL>'<STR_LIT>': call_tree,<EOL>'<STR_LIT>': call_tree.get('<STR_LIT>', <NUM_LIT:0>),<EOL>'<STR_LIT>': int(time.time())<EOL>}<EOL>
Runs statistical profiler on a module.