# HG changeset patch # User Ludovic Chabant # Date 1476331302 25200 # Node ID 08e6484a2600df33276ab84bed49e9c4f4e0acf4 # Parent bf9f4e55f75162bfca7cdad77c44b553d6e9c1c6 bake: Show bake stats in descending order of time. diff -r bf9f4e55f751 -r 08e6484a2600 piecrust/commands/builtin/baking.py --- a/piecrust/commands/builtin/baking.py Thu Sep 29 21:59:20 2016 -0700 +++ b/piecrust/commands/builtin/baking.py Wed Oct 12 21:01:42 2016 -0700 @@ -135,8 +135,9 @@ s = stats[name] logger.info(' Timers:') - for name in sorted(s.timers.keys()): - val_str = '%8.1f s' % s.timers[name] + for name, val in sorted(s.timers.items(), key=lambda i: i[1], + reverse=True): + val_str = '%8.1f s' % val logger.info( "%s[%s%s%s] %s" % (indent, Fore.GREEN, val_str, Fore.RESET, name))