-
Notifications
You must be signed in to change notification settings - Fork 2
/
bench.sh
40 lines (37 loc) · 932 Bytes
/
bench.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
foo=$(sysbench cpu --num-threads=1 run | grep "events per second" | grep -Eo '[0-9]+([.][0-9]+)?')
foo=${foo%.*}
if (( foo < 400 ))
then
foo="failed singlecore"
else
foo="passed singlecore"
fi
echo $foo >> /home/zorin/Desktop/result.txt
foo=$(sysbench cpu --num-threads=36 run | grep "events per second" | grep -Eo '[0-9]+([.][0-9]+)?')
foo=${foo%.*}
if (( foo < 600 ))
then
foo="failled multicore"
else
foo="passed multicore"
fi
echo $foo >> /home/zorin/Desktop/result.txt
foo=$(grep MemTotal /proc/meminfo | grep -Eo '[0-9]+([.][0-9]+)?')
foo=$(bc -l <<<"${foo}/1024/1024")
foo=${foo%.*}
if (( foo < 2 ))
then
foo="failed ram"
else
foo="passed ram"
fi
echo $foo >> /home/zorin/Desktop/result.txt
foo=$(lsblk -o ROTA | grep -c 0)
if (( foo > 0 ))
then
foo="ssd"
else
foo="hdd"
fi
echo $foo >> /home/zorin/Desktop/result.txt
su zorin -c "gsettings set org.gnome.desktop.session idle-delay 0"