提交 12aa9519 authored 作者: Mikhail Korobov's avatar Mikhail Korobov

PY3 fixed ProfileStats.summary() in Python 3.x

上级 5ec1e57f
......@@ -2353,7 +2353,7 @@ class EquilibriumOptimizer(NavigatorOptimizer):
t, count, n_created, o), file=stream)
print(blanc, ' %.3fs - in %d optimization that where not used (display only those with a runtime > 0)' % (
not_used_time, len(not_used)), file=stream)
not_used.sort()
not_used.sort(key=lambda nu: (nu[0], str(nu[1])))
for (t, o) in not_used[::-1]:
if t > 0:
# Skip opt that have 0 times, they probably wasn't even tried.
......@@ -2362,8 +2362,8 @@ class EquilibriumOptimizer(NavigatorOptimizer):
gf_opts = [o for o in (opt.global_optimizers +
list(opt.final_optimizers) +
list(opt.cleanup_optimizers))
if o.print_profile.func_code is not
Optimizer.print_profile.func_code]
if o.print_profile.__code__ is not
Optimizer.print_profile.__code__]
if not gf_opts:
return
print(blanc, "Global, final and clean up optimizers", file=stream)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论