You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
708 B

  1. #!/usr/bin/env bash
  2. if [ -z $1 ]; then
  3. procs=1
  4. else
  5. procs=$1
  6. fi
  7. bench_exec="sysbench"
  8. bench_var="--num-threads=$procs"
  9. bench="$bench_exec $benc_var"
  10. machine_ident="$(uname -nmo | sed 's/ /_/g' | sed 's/\//\./g')_$(cat /var/lib/dbus/machine-id)"
  11. logfile="$PWD/results/$(date -Idate)_${machine_ident}.log"
  12. mkdir -p tmp
  13. cd tmp
  14. touch $logfile
  15. $bench --test=fileio --file-test-mode=seqwr run | tee -ai $logfile
  16. free && sync && sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' && free
  17. $bench --test=fileio --file-test-mode=seqrd run | tee -ai $logfile
  18. rm -f test_file.*
  19. #$bench --test=fileio --file-test-mode=rndwr run
  20. #$bench --test=fileio --file-test-mode=rndrd run
  21. #rm -f test_file.*
  22. cd ..
  23. rm -rf tmp