diff -r 661cdbd617b8 Lib/pstats.py --- a/Lib/pstats.py Thu Apr 30 08:08:13 2015 -0700 +++ b/Lib/pstats.py Thu Apr 30 18:15:28 2015 +0200 @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """Class for printing reports on profiled python code.""" # Written by James Roskind @@ -518,7 +519,12 @@ #************************************************************************** def f8(x): - return "%8.3f" % x + ret = "%8.3f" % x + # In case time is less than 0.5 millisecond, + # display the time in microseconds with an alternate formatting + if ret != ' 0.000': + return ret + return "%6dµs" % (x * 10000000) #************************************************************************** # Statistics browser added by ESR, April 2001