Commit ef2aa62f authored by Chris Lamb's avatar Chris Lamb 💬

Avoid clumsy profiling title length calculations by using Markdown syntax, not reStructuredText.

parent 6b8e47dd
Pipeline #33692 failed with stage
in 14 minutes and 59 seconds
......@@ -72,21 +72,18 @@ class ProfileManager(object):
self.output(fn)
def output(self, print_fn):
title = "Profiling output for: {}".format(' '.join(sys.argv))
title = "# Profiling output for: {}".format(' '.join(sys.argv))
print_fn(title)
print_fn("=" * len(title))
def key(x):
return x[1]['time']
for namespace, keys in sorted(self.data.items(), key=lambda x: x[0]):
subtitle = "{} (total time: {:.3f}s)".format(
print_fn("\n## {} (total time: {:.3f}s)".format(
namespace,
sum(x['time'] for x in keys.values()),
)
print_fn("\n{}\n{}\n".format(subtitle, "-" * len(subtitle)))
))
for value, totals in sorted(keys.items(), key=key, reverse=True):
print_fn(" {:10.3f}s {:6d} call{} {}".format(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment