perf.sh 305 B

123456789101112131415161718
  1. #!/bin/bash
  2. echo -e "test\ttaille\tversion\texectime\tmem"
  3. for test in `seq 1 10`
  4. do
  5. taille=${RANDOM}000
  6. for version in 1 2 3 4
  7. do
  8. (
  9. res=`(/usr/bin/time -f "%U\t%M" ./recherche $taille $version > /dev/null) 2>&1`
  10. echo -e "$test\t$taille\tv$version\t$res"
  11. ) &
  12. done
  13. wait
  14. done