def shutdown(self): fname = self._filename pycallgraph = self.pycallgraph if fname.endswith('.png'): logging.info("Saving the rendered callgraph to '%s'", fname) pycallgraph.make_dot_graph(fname) elif fname.endswith('.dot'): logging.info("Saving the raw callgraph to '%s'", fname) pycallgraph.save_dot(fname)
def quit(signo, stackframe): """ Signal handler for aborting signals """ global httpd, config logging.info("Thanks for using MoinMoin!") fname = config.pycallgraph_output if fname: import pycallgraph if fname.endswith('.png'): pycallgraph.make_dot_graph(fname) elif fname.endswith('.dot'): pycallgraph.save_dot(fname) if httpd: httpd.die()
def wrapper(*args, **kwargs): pycallgraph.start_trace() func(*args, **kwargs) pycallgraph.save_dot('callgraph.log') pycallgraph.make_dot_graph('callgraph.png')