--- a/bench.py Thu May 28 20:41:24 2015 +0800
+++ b/bench.py Thu May 28 21:04:38 2015 +0800
conn = sqlite3.connect(DBPATH)
nodes = getnodes(revsets)
+ numwidth = len(str(len(nodes)))
for i, node in enumerate(nodes, 1):
time = test(mark, dropcache=not cache)
- logging.info('%05d/%05d %s %s %s', i, len(nodes), node, mark, time)
+ logging.info('%0*d/%0*d %s %s %s', numwidth, i, numwidth, len(nodes), node, mark, time)
if __name__ == '__main__':
- logging.getLogger().setLevel(logging.INFO)
+ logging.basicConfig(format='%(levelname).1s %(asctime)s %(message)s', level=logging.INFO)
args = parser.parse_args()