Command line I am using to analyze script execution time on Apache log
grep cgi-bin scripttime | cut -f6,8 -d’ ’ | sed -E s/\\\?.+//g | grep cgi-bin | sort | uniq -c | sort > statis
Where scripttime is a log with %T (script execution time) log. The above command line will obtain execution time, script name from log, then sort it by the execution time, then have a counted unique.