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.

31 lines
796 B

  1. #!/bin/bash
  2. if [ ! -f /etc/apt/sources.list.d/akopytov_sysbench.list ]; then
  3. echo "#################################"
  4. echo "installing sysbench"
  5. echo "#################################"
  6. {
  7. curl -sL https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | bash
  8. apt update && apt install -y sysbench
  9. } >/dev/null 2>&1
  10. fi
  11. echo "" >sysbench.log
  12. echo "#################################"
  13. echo "CPU Benchmark"
  14. echo "#################################"
  15. echo ""
  16. echo "starting Single thread CPU Benchmark"
  17. sysbench cpu --cpu-max-prime=20000 run
  18. echo "Single thread CPU Benchmark : [OK]"
  19. echo ""
  20. echo "starting Multi threads CPU Benchmark"
  21. sysbench cpu --threads="$(nproc)" --cpu-max-prime=20000 run
  22. echo "Multi threads CPU Benchmark : [OK]"