Subject: | time formats are too narrow |
The 'OUT' format does not allow for lines that take 10 seconds or more.
The format does not allow for 2 digits to the left of the decimal. This
ends up hiding very important information from the person reading
smallprof.out.
~> cat test.pl
sleep 1;
sleep 9;
sleep 11;
~> perl -d:SmallProf test.pl; sort -k 2nr smallprof.out
1 9.009251 0.000000 2:sleep 9;
1 1.008629 0.000000 1:sleep 1;
=================================================================
1 ######## 0.000000 3:sleep 11;
count wall tm cpu time line
Profile of test.pl
Page 1
================ SmallProf version 2.01 ================
The 'grep' format does not suffer from this problem:
scsqflpcs0101:/model/moron/working> SMALLPROF_CONFIG=g perl -d:SmallProf
test.pl; cat smallprof.out
* file name : line number : line count : time (ms) : ctime (ms) : line
source
test.pl:3:1:11009:0: sleep 11;
test.pl:2:1:9009:0: sleep 9;
test.pl:1:1:1009:0: sleep 1;
test.pl:0:0:0:0: use Devel::SmallProf;
test.pl:4:0:0:0: ?