coremark: 合并上游改动

This commit is contained in:
Hyy2001X
2021-06-17 23:55:26 +08:00
parent b40ef7e65c
commit 598f37eef3
4 changed files with 15 additions and 29 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
coremark > /tmp/coremark.log
Scores=$(cat /tmp/coremark.log 2> /dev/null | grep "CoreMark 1.0" | awk '{print $4}')
Processer=$(awk -F ':[ ]' '/model name/{printf ($2);exit}' /proc/cpuinfo)
[[ -n ${Processer} ]] && echo -e "\nProcesser: ${Processer}"
echo -e "Score: ${Scores}\nTime costs: $(grep "Total time" /tmp/coremark.log | awk '{print $4}')"
echo "(CPU Mark: ${Scores} Scores)" > /etc/bench.log
if [ -f /etc/bench.log ]; then
sed -i '/coremark/d' /etc/crontabs/root
crontab /etc/crontabs/root
fi
@@ -1,10 +0,0 @@
#!/bin/bash
echo -e "\nRunning CoreMark test,please wait ..."
Scores=$(cat /tmp/coremark.log 2> /dev/null | grep "CoreMark 1.0" | awk '{print $4}')
Processer=$(awk -F ':[ ]' '/model name/{printf ($2);exit}' /proc/cpuinfo)
Time=$(grep "Total time" /tmp/coremark.log | awk '{print $4}')
[[ -z "${Processer}" ]] && Processer=Unknown
echo -e "\nProcesser: ${Processer}\nScore: ${Scores}\nTime costs: ${Time}"
-17
View File
@@ -1,17 +0,0 @@
#!/bin/bash
echo -e "\nRunning CoreMark test,please wait ..."
/bin/coremark > /tmp/coremark.log
Scores=$(cat /tmp/coremark.log 2> /dev/null | grep "CoreMark 1.0" | awk '{print $4}')
Processer=$(awk -F ':[ ]' '/model name/{printf ($2);exit}' /proc/cpuinfo)
Time=$(grep "Total time" /tmp/coremark.log | awk '{print $4}')
[[ -z "${Processer}" ]] && Processer=Unknown
echo -e "\nProcesser: ${Processer}\nScore: ${Scores}\nTime costs: ${Time}"
echo "(CPU Mark: ${Scores} Scores)" > /etc/bench.log
if [ -f "/etc/bench.log" ]; then
sed -i '/coremark/d' /etc/crontabs/root
crontab /etc/crontabs/root
fi