提交 5b5c2bb3 authored 作者: Mohammad Pezeshki's avatar Mohammad Pezeshki

total_time_percent equation changed; descriptions added in printing

上级 ea83daac
......@@ -607,7 +607,7 @@ def debugprint(r, prefix='', depth=-1, done=None, print_type=False,
op_time_percent = (op_time / profile.fct_call_time) * 100
tot_time_dict = profile.compute_total_times()
tot_time = tot_time_dict[a]
tot_time_percent = (tot_time / max(tot_time_dict.values())) * 100
tot_time_percent = (profile.fct_call_time / max(tot_time_dict.values())) * 100
if len(a.outputs) == 1:
print >> file, '%s%s %s%s \'%s\' %s %s %s --> %8.2es %4.1f%% %8.2es %4.1f%%'\
......
......@@ -119,8 +119,25 @@ def debugprint(obj, depth=-1, print_type=False,
scan_ops.append(r)
if p != None:
print 'Timing Info\n-----------\n\t \
--> <time> <% time> - <total time> <% total time>'
# print 'Timing Info\n-----------\n\t \
# --> <time> <% time> - <total time> <% total time>'
print \
"""
Timing Info
-----------
--> <time> <% time> - <total time> <% total time>'
<time> computation time for this node
<% time> fraction of total computation time for this node
<total time> time for this node + total times for this node's ancestors
<% total time> total time for this node over total computation time
N.B.: <total time> and <% total time> may over-count computation times
if inputs to a node share a common ancestor and should be viewed as a
loose upper bound. Their intended use is to help rule out potential nodes
to remove when optimizing a graph because their <total time> is very low.
"""
debugmode.debugprint(r, depth=depth, done=done, print_type=print_type,
file=_file, order=order, ids=ids,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论