Subject: | More options for fprofpp |
When using Devel::FastProf and fprofpp, I often need the following two
one-liners for more statistics:
$ fprofpp -f fastprof.out | grep -v '^#' |perl -nle
'm/^.*?:\d+\s+(\S+).*/ and $sum += $1; END { print $sum }'
1021.36267999999
$ fprofpp -f fastprof.out | grep -v '^#' |perl -pe
's{^(.*?:\d+\s+)(\S+)}{$1.(sprintf "%.2f%%", $2 /
1021.36267999999*100)}e'| less
The first line returns the overall time in seconds and is used for the
second line, which turns every wallclock time into a percentage. It
would be nice if the first line would be printed at the end of the
fprofpp output, maybe again as a comment line, and if the output of
the second line could be generated by a new fprofpp option.
And thank you for the module, it turns out to be very useful!
Regards,
Slaven