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.

30 lines
796 B

#!/bin/bash
if [ ! -f /etc/apt/sources.list.d/akopytov_sysbench.list ]; then
echo "#################################"
echo "installing sysbench"
echo "#################################"
{
curl -sL https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | bash
apt update && apt install -y sysbench
} >/dev/null 2>&1
fi
echo "" >sysbench.log
echo "#################################"
echo "CPU Benchmark"
echo "#################################"
echo ""
echo "starting Single thread CPU Benchmark"
sysbench cpu --cpu-max-prime=20000 run
echo "Single thread CPU Benchmark : [OK]"
echo ""
echo "starting Multi threads CPU Benchmark"
sysbench cpu --threads="$(nproc)" --cpu-max-prime=20000 run
echo "Multi threads CPU Benchmark : [OK]"