2
我使用Pycallgraph生成输出,但我想保存中间图形输出(而不是生成图像),因为我想对它进行一些小的修改。pycallgraph在调试模式下不生成图形输出
我正在为:
PYTHONPATH=. pycallgraph -d graphviz -- ./ab_ndh_graph.py > out.graphd
这是产生2倍的东西:
- pycallgraph.png - 这是整个调用图(在 out.graphd graphd输出)
- filter_max_depth.png - 这是基于代码的调用 图(正确,但没有图形输出)
如何才能获得为“filter_max_depth”生成的图形输出?
文件内容:
config = Config(max_depth=2)
config.trace_filter = GlobbingFilter(exclude=[
'pycallgraph.*',
])
graphviz = GraphvizOutput(output_file='filter_max_depth.png')
with PyCallGraph(output=graphviz, config=config):
o = AB_NDH()
o.run()