improve printing in profiler

old-commit-hash: 42fb2b4737
commatwo_master
George Hotz 5 years ago
parent 1be0d5c72c
commit 75590c1f95
  1. 4
      common/profiler.py

@ -39,8 +39,8 @@ class Profiler():
print("******* Profiling *******") print("******* Profiling *******")
for n, ms in sorted(self.cp.items(), key=lambda x: -x[1]): for n, ms in sorted(self.cp.items(), key=lambda x: -x[1]):
if n in self.cp_ignored: if n in self.cp_ignored:
print("%30s: %7.2f percent: %3.0f IGNORED" % (n, ms*1000.0, ms/self.tot*100)) print("%30s: %9.2f percent: %3.0f IGNORED" % (n, ms*1000.0, ms/self.tot*100))
else: else:
print("%30s: %7.2f percent: %3.0f" % (n, ms*1000.0, ms/self.tot*100)) print("%30s: %9.2f percent: %3.0f" % (n, ms*1000.0, ms/self.tot*100))
print("Iter clock: %2.6f TOTAL: %2.2f" % (self.tot/self.iter, self.tot)) print("Iter clock: %2.6f TOTAL: %2.2f" % (self.tot/self.iter, self.tot))

Loading…
Cancel
Save