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()