Update bench.sh

This commit is contained in:
Teddysun 2022-01-02 21:32:29 +09:00
parent ed8826fccb
commit d7b431f32a
No known key found for this signature in database
GPG Key ID: 09BD4C080AD6C46D

View File

@ -176,7 +176,7 @@ ipv4_info() {
} }
install_speedtest() { install_speedtest() {
if [ ! -e "./speedtest-cli/speedtest" ]; then if [ ! -e "./speedtest-cli/speedtest" ]; then
sys_bit="" sys_bit=""
local sysarch="$(uname -m)" local sysarch="$(uname -m)"
if [ "${sysarch}" = "unknown" ] || [ "${sysarch}" = "" ]; then if [ "${sysarch}" = "unknown" ] || [ "${sysarch}" = "" ]; then
@ -252,10 +252,10 @@ print_system_info() {
echo " CPU Model : $(_blue "$cname")" echo " CPU Model : $(_blue "$cname")"
echo " CPU Cores : $(_blue "$cores")" echo " CPU Cores : $(_blue "$cores")"
if [ -n "$freq" ]; then if [ -n "$freq" ]; then
echo " CPU Frequency : $(_blue "$freq MHz")" echo " CPU Frequency : $(_blue "$freq MHz")"
fi fi
if [ -n "$ccache" ]; then if [ -n "$ccache" ]; then
echo " CPU Cache : $(_blue "$ccache")" echo " CPU Cache : $(_blue "$ccache")"
fi fi
echo " Total Disk : $(_yellow "$disk_total_size GB") $(_blue "($disk_used_size GB Used)")" echo " Total Disk : $(_yellow "$disk_total_size GB") $(_blue "($disk_used_size GB Used)")"
echo " Total Mem : $(_yellow "$tram MB") $(_blue "($uram MB Used)")" echo " Total Mem : $(_yellow "$tram MB") $(_blue "($uram MB Used)")"
@ -313,11 +313,11 @@ print_end_time() {
! _exists "wget" && _red "Error: wget command not found.\n" && exit 1 ! _exists "wget" && _red "Error: wget command not found.\n" && exit 1
! _exists "free" && _red "Error: free command not found.\n" && exit 1 ! _exists "free" && _red "Error: free command not found.\n" && exit 1
start_time=$(date +%s) start_time=$(date +%s)
get_system_info
check_virt check_virt
clear clear
print_intro print_intro
next next
get_system_info
print_system_info print_system_info
ipv4_info ipv4_info
next next