Merge pull request #1 from masonr/master

update
This commit is contained in:
Christian Schulthess 2023-09-22 14:31:57 +02:00 committed by GitHub
commit 414c3abbb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 49 additions and 41 deletions

View File

@ -77,7 +77,6 @@ Sites supporting submission of YABS JSON results:
| --- | --- |
| [YABSdb](https://yabsdb.com/) | `curl -sL yabs.sh \| bash -s -- -s "https://yabsdb.com/add"` |
| [VPSBenchmarks](https://www.vpsbenchmarks.com/yabs/get_started) | `curl -sL yabs.sh \| bash -s -- -s https://www.vpsbenchmarks.com/yabs/upload` |
| [s0c Online](https://s0c.org/) | `curl -sL yabs.sh \| bash -s -- -s https://s0c.org/api/yabs -9` |
Example JSON output: [example.json](bin/example.json).
@ -185,7 +184,7 @@ YABS completed in 12 min 49 sec
## Acknowledgements
This script was inspired by several great benchmarking scripts out there, including, but not limited to, [bench.sh](https://bench.sh/), [nench.sh](https://github.com/n-st/nench), [ServerBench](https://github.com/K4Y5/ServerBench), among others. Members of the [HostedTalk](https://hostedtalk.net), [LowEndSpirit](https://lowendspirit.com), and [LowEndTalk](https://lowendtalk.com) hosting-related communities play a pivotal role in testing, evaluating, and shaping this script as it matures.
This script was inspired by several great benchmarking scripts out there, including, but not limited to, [bench.sh](https://bench.sh/), [nench.sh](https://github.com/n-st/nench), [ServerBench](https://github.com/K4Y5/ServerBench), among others. Members of the [HostBalls](https://hostballs.com), [LowEndSpirit](https://lowendspirit.com), and [LowEndTalk](https://lowendtalk.com) hosting-related communities play a pivotal role in testing, evaluating, and shaping this script as it matures.
## License
```

View File

@ -6,18 +6,16 @@ This directory contains all of the binaries required to run the benchmarking tes
| Binary Name | Version | Compile Date | Architecture | OS |
|:-:|:-:|:-:|:-:|:-:|
| fio_x64 | 3.34 | 24-MAR-2023 | x86_64 | 64-bit |
| fio_x86 | 3.30* | 19-AUG-2022 | x86 | 32-bit |
| fio_aarch64 | 3.34 | 24-MAR-2023 | ARM | 64-bit |
| fio_arm | 3.34 | 24-MAR-2023 | ARM | 32-bit |
| iperf_x64 | 3.13 | 26-FEB-2023 | x86_64 | 64-bit |
| iperf_x86 | 3.13 | 26-FEB-2023 | x86 | 32-bit |
| iperf_aarch64 | 3.13 | 26-FEB-2023 | ARM | 64-bit |
| iperf_arm | 3.13 | 26-FEB-2023 | ARM | 32-bit |
| fio_x64 | 3.35 | 12-JUL-2023 | x86_64 | 64-bit |
| fio_x86 | 3.35 | 12-JUL-2022 | x86 | 32-bit |
| fio_aarch64 | 3.35 | 12-JUL-2023 | ARM | 64-bit |
| fio_arm | 3.35 | 12-JUL-2023 | ARM | 32-bit |
| iperf_x64 | 3.14 | 12-JUL-2023 | x86_64 | 64-bit |
| iperf_x86 | 3.14 | 12-JUL-2023 | x86 | 32-bit |
| iperf_aarch64 | 3.14 | 12-JUL-2023 | ARM | 64-bit |
| iperf_arm | 3.14 | 12-JUL-2023 | ARM | 32-bit |
Note: ARM compatibility is considered experimental. Static binaries for ARM-based machines are cross-compiled within a Holy Build Box container using the [musl toolchain](https://musl.cc/).
\* fio v3.31+ is failing to build in a 32-bit environment
Note: ARM compatibility is considered experimental. Static binaries for 32-bit and ARM-based machines are cross-compiled within a Holy Build Box container using the [musl toolchain](https://musl.cc/).
### Compile Notes
@ -30,28 +28,28 @@ Note: ARM compatibility is considered experimental. Static binaries for ARM-base
docker run -t -i --rm -v `pwd`:/io phusion/holy-build-box-64:latest bash /io/compile.sh
```
**Compiling 32-bit binaries**:
64-bit binaries will be placed in the current directory.
```sh
docker run -t -i --rm -v `pwd`:/io phusion/holy-build-box-32:latest linux32 bash /io/compile.sh
```
64-bit and 32-bit binaries will be placed in the current directory.
### ARM Compile Notes
### Cross-compiling Notes
Compilation of ARM-compatible binaries requires additional environment variables to identify the proper musl toolchain and architecture to target for cross-compilation.
**Compiling 64-bit binaries**:
```sh
docker run -t -i --rm -v `pwd`:/io --env ARCH=aarch64 --env CROSS=aarch64-linux-musl --env HOST=aarch64-linux-gnu phusion/holy-build-box-64:latest bash /io/compile-arm.sh
```
**Compiling 32-bit binaries**:
```sh
docker run -t -i --rm -v `pwd`:/io --env ARCH=arm --env CROSS=arm-linux-musleabihf --env HOST=arm-linux-gnueabihf phusion/holy-build-box-64:latest bash /io/compile-arm.sh
docker run -t -i --rm -v `pwd`:/io --env ARCH=i686 --env CROSS=i686-linux-musl --env HOST=i686-linux-musl phusion/holy-build-box-64:latest bash /io/cross-compile.sh
```
64-bit (aarch64) and 32-bit (arm) binaries will be placed in the current directory.
**Compiling ARM 64-bit binaries**:
```sh
docker run -t -i --rm -v `pwd`:/io --env ARCH=aarch64 --env CROSS=aarch64-linux-musl --env HOST=aarch64-linux-gnu phusion/holy-build-box-64:latest bash /io/cross-compile.sh
```
**Compiling ARM 32-bit binaries**:
```sh
docker run -t -i --rm -v `pwd`:/io --env ARCH=arm --env CROSS=arm-linux-musleabihf --env HOST=arm-linux-gnueabihf phusion/holy-build-box-64:latest bash /io/cross-compile.sh
```
64-bit (aarch64) and 32-bit (x86, arm) binaries will be placed in the current directory.

View File

@ -35,7 +35,7 @@ source /hbb_exe/activate
# download and compile fio
cd ~
curl -L https://github.com/axboe/fio/archive/fio-3.34.tar.gz -o "fio.tar.gz"
curl -L https://github.com/axboe/fio/archive/fio-3.35.tar.gz -o "fio.tar.gz"
tar xf fio.tar.gz
cd fio-fio*
./configure --disable-native
@ -48,7 +48,7 @@ cp fio /io/fio_$ARCH
# download and compile iperf
cd ~
curl -L https://github.com/esnet/iperf/archive/3.13.tar.gz -o "iperf.tar.gz"
curl -L https://github.com/esnet/iperf/archive/3.14.tar.gz -o "iperf.tar.gz"
tar xf iperf.tar.gz
cd iperf*
./configure --disable-shared --disable-profiling

View File

@ -26,7 +26,7 @@ source /hbb_exe/activate
# download and compile fio
cd ~
curl -L https://github.com/axboe/fio/archive/fio-3.34.tar.gz -o "fio.tar.gz"
curl -L https://github.com/axboe/fio/archive/fio-3.35.tar.gz -o "fio.tar.gz"
tar xf fio.tar.gz
cd fio-fio*
CC=/root/${CROSS}-cross/bin/${CROSS}-gcc ./configure --disable-native --build-static
@ -39,7 +39,7 @@ cp fio /io/fio_$ARCH
# download and compile iperf
cd ~
curl -L https://github.com/esnet/iperf/archive/3.13.tar.gz -o "iperf.tar.gz"
curl -L https://github.com/esnet/iperf/archive/3.14.tar.gz -o "iperf.tar.gz"
tar xf iperf.tar.gz
cd iperf*
CC=/root/${CROSS}-cross/bin/${CROSS}-gcc ./configure --disable-shared --disable-profiling --build x86_64-pc-linux-gnu --host ${HOST} --with-openssl=no --enable-static-bin

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

27
yabs.sh
View File

@ -1,7 +1,7 @@
#!/bin/bash
# Yet Another Bench Script by Mason Rowe
# Initial Oct 2019; Last update Apr 2023
# Initial Oct 2019; Last update Sep 2023
# Disclaimer: This project is a work in progress. Any errors or suggestions should be
# relayed to me via the GitHub project page linked below.
@ -12,7 +12,7 @@
# performance via fio. The script is designed to not require any dependencies
# - either compiled or installed - nor admin privileges to run.
YABS_VERSION="v2023-04-23"
YABS_VERSION="v2023-09-06"
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
echo -e '# Yet-Another-Bench-Script #'
@ -298,9 +298,15 @@ function ip_info() {
echo "$net_type Network Information:"
echo "---------------------------------"
if [[ -n "$isp" && -n "$as" ]]; then
if [[ -n "$isp" ]]; then
echo "ISP : $isp"
else
echo "ISP : Unknown"
fi
if [[ -n "$as" ]]; then
echo "ASN : $as"
else
echo "ASN : Unknown"
fi
if [[ -n "$org" ]]; then
echo "Host : $org"
@ -817,7 +823,7 @@ if [ -z "$SKIP_IPERF" ]; then
"speedtest.uztelecom.uz" "5200-5207" "Uztelecom" "Tashkent, UZ (10G)" "IPv4|IPv6" \
"nyc.speedtest.clouvider.net" "5200-5209" "Clouvider" "NYC, NY, US (10G)" "IPv4|IPv6" \
"dal.speedtest.clouvider.net" "5200-5209" "Clouvider" "Dallas, TX, US (10G)" "IPv4|IPv6" \
"la.speedtest.clouvider.net" "5200-5209" "Clouvider" "Los Angeles, CA, US (10G)" "IPv4|IPv6" \
"la.speedtest.clouvider.net" "5200-5209" "Clouvider" "Los Angeles, CA, US (10G)" "IPv4|IPv6"
)
# if the "REDUCE_NET" flag is activated, then do a shorter iperf test with only three locations
@ -883,8 +889,8 @@ function launch_geekbench {
|| GB_URL="https://cdn.geekbench.com/Geekbench-5.5.1-Linux.tar.gz"
GB_CMD="geekbench5"
else # Geekbench v6
[[ $ARCH = *aarch64* || $ARCH = *arm* ]] && GB_URL="https://cdn.geekbench.com/Geekbench-6.1.0-LinuxARMPreview.tar.gz" \
|| GB_URL="https://cdn.geekbench.com/Geekbench-6.1.0-Linux.tar.gz"
[[ $ARCH = *aarch64* || $ARCH = *arm* ]] && GB_URL="https://cdn.geekbench.com/Geekbench-6.2.0-LinuxARMPreview.tar.gz" \
|| GB_URL="https://cdn.geekbench.com/Geekbench-6.2.0-Linux.tar.gz"
GB_CMD="geekbench6"
fi
GB_RUN="True"
@ -894,8 +900,13 @@ function launch_geekbench {
if [[ $GB_RUN == *True* ]]; then # run GB test
echo -en "\nRunning GB$VERSION benchmark test... *cue elevator music*"
# download the desired Geekbench tarball and extract to geekbench temp directory
$DL_CMD $GB_URL | tar xz --strip-components=1 -C $GEEKBENCH_PATH &>/dev/null
# check for local geekbench installed
if command -v "$GB_CMD" &>/dev/null; then
GEEKBENCH_PATH=$(dirname "$(command -v "$GB_CMD")")
else
# download the desired Geekbench tarball and extract to geekbench temp directory
$DL_CMD $GB_URL | tar xz --strip-components=1 -C $GEEKBENCH_PATH &>/dev/null
fi
# unlock if license file detected
test -f "geekbench.license" && $GEEKBENCH_PATH/$GB_CMD --unlock $(cat geekbench.license) > /dev/null 2>&1