#/bin/sh

# greps for qWait() in test sources and lists them by duration.

grepWait()
{
  for D in `find . -type d -name auto`
  do
    echo $D 
    find $D -type f -name "*.cpp" | xargs fgrep -n 'qWait(' |\
    sed -e 's/\(^[^(]*\)(\([^)]*\)/\2:\1(\2/'
  done
}

grepWait | sort -r -n
