提交 93c724f4 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix when fct_call_time == 0, thanks @notoraptor

上级 ab3831da
...@@ -863,7 +863,7 @@ def pydotprint(fct, outfile=None, ...@@ -863,7 +863,7 @@ def pydotprint(fct, outfile=None,
if profile: if profile:
time = profile.apply_time.get(node, 0) time = profile.apply_time.get(node, 0)
# second, %fct time in profiler # second, %fct time in profiler
if profile.fct_callcount == 0: if profile.fct_callcount == 0 or profile.fct_call_time == 0:
pf = 0 pf = 0
else: else:
pf = time * 100 / profile.fct_call_time pf = time * 100 / profile.fct_call_time
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论