|
|
AE_step_count.pl
#!/usr/local/bin/perl -n
################################################################ # Little helper script I use for performance tuning # PS Application Engine programs. This program expects # to read an AE log file. It spits out a listing if # all the steps that were executed, and the cumulative # run times. This helps to identify steps that may not # run excessively long for a single execution, but may # be run over and over, usually in a loop. Sometimes # these are steps that run in a fraction of a second, # but if the process loops through it millions of times # a minor improvement in performance can be significant. ################################################################
if ( substr($_, 2, 1) eq "." ) { $lparn=index($_, "("); $rparn=index($_,")"); $aestep=substr($_, $lparn + 1, $rparn - $lparn - 1); ++$ae{$aestep} if $lparn gt 0 && $rparn gt 0; }
if (eof) { foreach $key (sort keys %ae) { printf "%25s\t%8d\n", $key, $ae{$key}; } }
|
|