This commit is contained in:
spiritysdx
2024-07-26 18:50:18 +08:00
parent ac1da2af0a
commit b5fce2e16b
6 changed files with 18 additions and 4 deletions

View File

@@ -109,6 +109,7 @@ shell脚本的说明
geekbench (geekbench5) (仅支持 IPV4 环境,且内存大于 1GB 并需要持续联网,仅支持 amd64 和 arm64 架构。) geekbench (geekbench5) (仅支持 IPV4 环境,且内存大于 1GB 并需要持续联网,仅支持 amd64 和 arm64 架构。)
speedtest (使用官方提供的二进制文件以获得更准确的测试结果。) speedtest (使用官方提供的二进制文件以获得更准确的测试结果。)
ping (使用官方提供的二进制文件以获得更准确的测试结果。) ping (使用官方提供的二进制文件以获得更准确的测试结果。)
systemd-detect-virt 或 dmidecode (几乎所有类 Unix 系统都有,安装以获得更准确的测试结果。)
事实上sysbench/geekbench 是上述依赖项中唯一必须安装的,没有它们无法测试 CPU 分数。 事实上sysbench/geekbench 是上述依赖项中唯一必须安装的,没有它们无法测试 CPU 分数。
./goecs.sh install 安装 goecs 命令 ./goecs.sh install 安装 goecs 命令
./goecs.sh upgrade 升级 goecs 命令 ./goecs.sh upgrade 升级 goecs 命令

View File

@@ -97,6 +97,7 @@ Available commands:
geekbench (geekbench5)(Only support IPV4 environment, and memory greater than 1GB network detection, only support amd64 and arm64 architecture.) geekbench (geekbench5)(Only support IPV4 environment, and memory greater than 1GB network detection, only support amd64 and arm64 architecture.)
speedtest (Use the officially provided binaries for more accurate test results.) speedtest (Use the officially provided binaries for more accurate test results.)
ping (Use the officially provided binaries for more accurate test results.) ping (Use the officially provided binaries for more accurate test results.)
systemd-detect-virt OR dmidecode (Almost all unix-like systems have it, for more accurate test results.)
In fact, sysbench/geekbench is the only one of the above dependencies that must be installed, without which the CPU score cannot be tested. In fact, sysbench/geekbench is the only one of the above dependencies that must be installed, without which the CPU score cannot be tested.
./goecs.sh install Install goecs command ./goecs.sh install Install goecs command
./goecs.sh upgrade Upgrade goecs command ./goecs.sh upgrade Upgrade goecs command

2
go.mod
View File

@@ -7,7 +7,7 @@ require (
github.com/oneclickvirt/CommonMediaTests v0.0.4-20240704024502 github.com/oneclickvirt/CommonMediaTests v0.0.4-20240704024502
github.com/oneclickvirt/UnlockTests v0.0.13-20240726021207 github.com/oneclickvirt/UnlockTests v0.0.13-20240726021207
github.com/oneclickvirt/backtrace v0.0.4-20240702140722 github.com/oneclickvirt/backtrace v0.0.4-20240702140722
github.com/oneclickvirt/basics v0.0.6-20240706025619 github.com/oneclickvirt/basics v0.0.6-20240726104105
github.com/oneclickvirt/cputest v0.0.8-20240702070215 github.com/oneclickvirt/cputest v0.0.8-20240702070215
github.com/oneclickvirt/defaultset v0.0.2-20240624082446 github.com/oneclickvirt/defaultset v0.0.2-20240624082446
github.com/oneclickvirt/disktest v0.0.4-20240704095213 github.com/oneclickvirt/disktest v0.0.4-20240704095213

4
go.sum
View File

@@ -84,8 +84,8 @@ github.com/oneclickvirt/UnlockTests v0.0.13-20240726021207 h1:pe9RKF/8QxNaxwyzLH
github.com/oneclickvirt/UnlockTests v0.0.13-20240726021207/go.mod h1:HP3CvAS+AJWxxY+BVbxIOlvaQ87YOSge89vAMG52b5o= github.com/oneclickvirt/UnlockTests v0.0.13-20240726021207/go.mod h1:HP3CvAS+AJWxxY+BVbxIOlvaQ87YOSge89vAMG52b5o=
github.com/oneclickvirt/backtrace v0.0.4-20240702140722 h1:UJ/VWf+ZbhGarc9HcHMIyenpmX+b2LxkXu0hlLk3Gxs= github.com/oneclickvirt/backtrace v0.0.4-20240702140722 h1:UJ/VWf+ZbhGarc9HcHMIyenpmX+b2LxkXu0hlLk3Gxs=
github.com/oneclickvirt/backtrace v0.0.4-20240702140722/go.mod h1:zvsC7xY/WZqs5KL2JB967OVnuqjNbxu9bW6wXRLo5h8= github.com/oneclickvirt/backtrace v0.0.4-20240702140722/go.mod h1:zvsC7xY/WZqs5KL2JB967OVnuqjNbxu9bW6wXRLo5h8=
github.com/oneclickvirt/basics v0.0.6-20240706025619 h1:IVuyJY41eNAjH9rFf5FPzjegRbkDiS4os9+1YaUov4M= github.com/oneclickvirt/basics v0.0.6-20240726104105 h1:Zp6+thG0NI5UdOzWZjMCTGaNGeMDY9PyqI/QsmRjHjQ=
github.com/oneclickvirt/basics v0.0.6-20240706025619/go.mod h1:MkFyxHrB+xuTqprJ3e4KvG0jv3IfHMbc/MPfGXI/n7U= github.com/oneclickvirt/basics v0.0.6-20240726104105/go.mod h1:MkFyxHrB+xuTqprJ3e4KvG0jv3IfHMbc/MPfGXI/n7U=
github.com/oneclickvirt/cputest v0.0.8-20240702070215 h1:CcFpyVPlQkJ6vjFP17BRuJhh/afiJhOhZ0BW+TtfVDg= github.com/oneclickvirt/cputest v0.0.8-20240702070215 h1:CcFpyVPlQkJ6vjFP17BRuJhh/afiJhOhZ0BW+TtfVDg=
github.com/oneclickvirt/cputest v0.0.8-20240702070215/go.mod h1:MmaHN9+XMntI3rLycwj8Ne31fG18IfNoa8N2utDK1CY= github.com/oneclickvirt/cputest v0.0.8-20240702070215/go.mod h1:MmaHN9+XMntI3rLycwj8Ne31fG18IfNoa8N2utDK1CY=
github.com/oneclickvirt/defaultset v0.0.2-20240624082446 h1:5Pg3mK/u/vQvSz7anu0nxzrNdELi/AcDAU1mMsmPzyc= github.com/oneclickvirt/defaultset v0.0.2-20240624082446 h1:5Pg3mK/u/vQvSz7anu0nxzrNdELi/AcDAU1mMsmPzyc=

View File

@@ -38,7 +38,7 @@ import (
) )
var ( var (
ecsVersion = "v0.0.54" ecsVersion = "v0.0.55"
menuMode bool menuMode bool
onlyChinaTest bool onlyChinaTest bool
input, choice string input, choice string

View File

@@ -308,6 +308,16 @@ env_check() {
_green "Installing unzip" _green "Installing unzip"
${PACKAGE_INSTALL[int]} unzip ${PACKAGE_INSTALL[int]} unzip
fi fi
if ! command -v systemd-detect-virt >/dev/null 2>&1; then
_green "Installing systemd-detect-virt"
${PACKAGE_INSTALL[int]} systemd-detect-virt
if [ $? -ne 0 ]; then
if ! command -v dmidecode >/dev/null 2>&1; then
_green "Installing dmidecode"
${PACKAGE_INSTALL[int]} dmidecode
fi
fi
fi
if ! command -v dd >/dev/null 2>&1; then if ! command -v dd >/dev/null 2>&1; then
_green "Installing dd" _green "Installing dd"
${PACKAGE_INSTALL[int]} dd ${PACKAGE_INSTALL[int]} dd
@@ -395,6 +405,7 @@ show_help() {
geekbench (geekbench5) (仅支持 IPV4 环境,且内存大于 1GB 并需要持续联网,仅支持 amd64 和 arm64 架构。) geekbench (geekbench5) (仅支持 IPV4 环境,且内存大于 1GB 并需要持续联网,仅支持 amd64 和 arm64 架构。)
speedtest (使用官方提供的二进制文件以获得更准确的测试结果。) speedtest (使用官方提供的二进制文件以获得更准确的测试结果。)
ping (使用官方提供的二进制文件以获得更准确的测试结果。) ping (使用官方提供的二进制文件以获得更准确的测试结果。)
systemd-detect-virt 或 dmidecode (几乎所有类 Unix 系统都有,安装以获得更准确的测试结果。)
事实上sysbench/geekbench 是上述依赖项中唯一必须安装的,没有它们无法测试 CPU 分数。 事实上sysbench/geekbench 是上述依赖项中唯一必须安装的,没有它们无法测试 CPU 分数。
./goecs.sh install 安装 goecs 命令 ./goecs.sh install 安装 goecs 命令
./goecs.sh upgrade 升级 goecs 命令 ./goecs.sh upgrade 升级 goecs 命令
@@ -413,6 +424,7 @@ Available commands:
geekbench (geekbench5)(Only support IPV4 environment, and memory greater than 1GB network detection, only support amd64 and arm64 architecture.) geekbench (geekbench5)(Only support IPV4 environment, and memory greater than 1GB network detection, only support amd64 and arm64 architecture.)
speedtest (Use the officially provided binaries for more accurate test results.) speedtest (Use the officially provided binaries for more accurate test results.)
ping (Use the officially provided binaries for more accurate test results.) ping (Use the officially provided binaries for more accurate test results.)
systemd-detect-virt OR dmidecode (Almost all unix-like systems have it, for more accurate test results.)
In fact, sysbench/geekbench is the only one of the above dependencies that must be installed, without which the CPU score cannot be tested. In fact, sysbench/geekbench is the only one of the above dependencies that must be installed, without which the CPU score cannot be tested.
./goecs.sh install Install goecs command ./goecs.sh install Install goecs command
./goecs.sh upgrade Upgrade goecs command ./goecs.sh upgrade Upgrade goecs command