From 6660126edf6c73b48faa3931264f9d58e5b4f299 Mon Sep 17 00:00:00 2001 From: Mason Rowe Date: Sun, 9 Aug 2020 17:13:44 -0400 Subject: [PATCH 1/3] Added check for Geekbench license key --- README.md | 2 ++ yabs.sh | 20 ++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0e1868d..739a933 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ curl -sL yabs.sh | bash -s -- -{fdighr49} Options can be grouped together to skip multiple tests, i.e. `-fg` to skip the disk and system performance tests (effectively only testing network performance). +**Geekbench License Key**: A Geekbench license key can be utilized during the Geekbench test to unlock all features. Simply put the email and key for the license in a file called _geekbench.license_. `echo "email@domain.com ABCDE-12345-FGHIJ-57890" > geekbench.license` + ## Tests Conducted * **fio** - the most comprehensive I/O testing software available, fio grants the ability to evaluate disk performance in a variety of methods with a variety of options. Four random read and write fio disk tests are conducted as part of this script with 4k, 64k, 512k, and 1m block sizes. The tests are designed to evaluate disk throughput in near-real world (using random) scenarios with a 50/50 split (50% reads and 50% writes per test). diff --git a/yabs.sh b/yabs.sh index 6f49730..b45ac41 100755 --- a/yabs.sh +++ b/yabs.sh @@ -1,7 +1,7 @@ #!/bin/bash # Yet Another Bench Script by Mason Rowe -# Initial Oct 2019; Last update Jun 2020 +# Initial Oct 2019; Last update Aug 2020 # # Disclaimer: This project is a work in progress. Any errors or suggestions should be # relayed to me via the GitHub project page linked below. @@ -15,7 +15,7 @@ echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' echo -e '# Yet-Another-Bench-Script #' -echo -e '# v2020-06-20 #' +echo -e '# v2020-08-09 #' echo -e '# https://github.com/masonr/yet-another-bench-script #' echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' @@ -554,6 +554,14 @@ function launch_geekbench { GEEKBENCH_PATH=$YABS_PATH/geekbench_$VERSION mkdir -p $GEEKBENCH_PATH + # check if geekbench file exists + if test -f "geekbench.license"; then + GEEKBENCH_LICENSE="--unlock "`cat geekbench.license` + else + GEEKBENCH_LICENSE="" + fi + + if [[ $VERSION == *4* ]]; then # Geekbench v4 echo -en "\nPerforming Geekbench 4 benchmark test... *cue elevator music*" # download the latest Geekbench 4 tarball and extract to geekbench temp directory @@ -561,10 +569,10 @@ function launch_geekbench { if [[ "$ARCH" == *"x86"* ]]; then # run the Geekbench 4 test and grep the test results URL given at the end of the test - GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench_x86_32 2>/dev/null | grep "https://browser") + GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench_x86_32 $GEEKBENCH_LICENSE 2>/dev/null | grep "https://browser") else # run the Geekbench 4 test and grep the test results URL given at the end of the test - GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench4 2>/dev/null | grep "https://browser") + GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench4 $GEEKBENCH_LICENSE 2>/dev/null | grep "https://browser") fi fi @@ -577,7 +585,7 @@ function launch_geekbench { # download the latest Geekbench 5 tarball and extract to geekbench temp directory curl -s http://cdn.geekbench.com/Geekbench-5.2.0-Linux.tar.gz | tar xz --strip-components=1 -C $GEEKBENCH_PATH &>/dev/null - GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench5 2>/dev/null | grep "https://browser") + GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench5 $GEEKBENCH_LICENSE 2>/dev/null | grep "https://browser") fi fi @@ -596,7 +604,7 @@ function launch_geekbench { GEEKBENCH_URL_CLAIM=$(echo $GEEKBENCH_URL | awk '{ print $2 }') GEEKBENCH_URL=$(echo $GEEKBENCH_URL | awk '{ print $1 }') # sleep a bit to wait for results to be made available on the geekbench website - sleep 10 + sleep 20 # parse the public results page for the single and multi core geekbench scores [[ $VERSION == *5* ]] && GEEKBENCH_SCORES=$(curl -s $GEEKBENCH_URL | grep "div class='score'") || GEEKBENCH_SCORES=$(curl -s $GEEKBENCH_URL | grep "class='score' rowspan") From 6d46cb0d8bdb651359b42f7d293cc0b832c26433 Mon Sep 17 00:00:00 2001 From: Mason Rowe Date: Thu, 13 Aug 2020 16:41:29 -0400 Subject: [PATCH 2/3] Update to fix geekbench unlock via license key --- yabs.sh | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/yabs.sh b/yabs.sh index b45ac41..4962e41 100755 --- a/yabs.sh +++ b/yabs.sh @@ -554,25 +554,27 @@ function launch_geekbench { GEEKBENCH_PATH=$YABS_PATH/geekbench_$VERSION mkdir -p $GEEKBENCH_PATH - # check if geekbench file exists - if test -f "geekbench.license"; then - GEEKBENCH_LICENSE="--unlock "`cat geekbench.license` - else - GEEKBENCH_LICENSE="" - fi - - if [[ $VERSION == *4* ]]; then # Geekbench v4 echo -en "\nPerforming Geekbench 4 benchmark test... *cue elevator music*" # download the latest Geekbench 4 tarball and extract to geekbench temp directory curl -s http://cdn.geekbench.com/Geekbench-4.4.2-Linux.tar.gz | tar xz --strip-components=1 -C $GEEKBENCH_PATH &>/dev/null if [[ "$ARCH" == *"x86"* ]]; then + # check if geekbench file exists + if test -f "geekbench.license"; then + $GEEKBENCH_PATH/geekbench_x86_32 --unlock "`cat geekbench.license` 2>/dev/null + fi + # run the Geekbench 4 test and grep the test results URL given at the end of the test - GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench_x86_32 $GEEKBENCH_LICENSE 2>/dev/null | grep "https://browser") + GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench_x86_32 2>/dev/null | grep "https://browser") else + # check if geekbench file exists + if test -f "geekbench.license"; then + $GEEKBENCH_PATH/geekbench4 --unlock "`cat geekbench.license` 2>/dev/null + fi + # run the Geekbench 4 test and grep the test results URL given at the end of the test - GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench4 $GEEKBENCH_LICENSE 2>/dev/null | grep "https://browser") + GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench4 2>/dev/null | grep "https://browser") fi fi @@ -585,7 +587,12 @@ function launch_geekbench { # download the latest Geekbench 5 tarball and extract to geekbench temp directory curl -s http://cdn.geekbench.com/Geekbench-5.2.0-Linux.tar.gz | tar xz --strip-components=1 -C $GEEKBENCH_PATH &>/dev/null - GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench5 $GEEKBENCH_LICENSE 2>/dev/null | grep "https://browser") + # check if geekbench file exists + if test -f "geekbench.license"; then + $GEEKBENCH_PATH/geekbench5 --unlock "`cat geekbench.license` 2>/dev/null + fi + + GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench5 2>/dev/null | grep "https://browser") fi fi From eca5dc9fd3fcb30a8724ab60137aeb709e33bc3b Mon Sep 17 00:00:00 2001 From: Mason Rowe Date: Wed, 9 Sep 2020 21:32:25 -0400 Subject: [PATCH 3/3] Updated Geekbench tests to use license file, if present --- yabs.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/yabs.sh b/yabs.sh index 4962e41..428e906 100755 --- a/yabs.sh +++ b/yabs.sh @@ -1,7 +1,7 @@ #!/bin/bash # Yet Another Bench Script by Mason Rowe -# Initial Oct 2019; Last update Aug 2020 +# Initial Oct 2019; Last update Sept 2020 # # Disclaimer: This project is a work in progress. Any errors or suggestions should be # relayed to me via the GitHub project page linked below. @@ -15,7 +15,7 @@ echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' echo -e '# Yet-Another-Bench-Script #' -echo -e '# v2020-08-09 #' +echo -e '# v2020-09-09 #' echo -e '# https://github.com/masonr/yet-another-bench-script #' echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' @@ -562,19 +562,19 @@ function launch_geekbench { if [[ "$ARCH" == *"x86"* ]]; then # check if geekbench file exists if test -f "geekbench.license"; then - $GEEKBENCH_PATH/geekbench_x86_32 --unlock "`cat geekbench.license` 2>/dev/null + $GEEKBENCH_PATH/geekbench_x86_32 --unlock `cat geekbench.license` > /dev/null 2>&1 fi - + # run the Geekbench 4 test and grep the test results URL given at the end of the test - GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench_x86_32 2>/dev/null | grep "https://browser") + GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench_x86_32 --upload 2>/dev/null | grep "https://browser") else # check if geekbench file exists if test -f "geekbench.license"; then - $GEEKBENCH_PATH/geekbench4 --unlock "`cat geekbench.license` 2>/dev/null + $GEEKBENCH_PATH/geekbench4 --unlock `cat geekbench.license` > /dev/null 2>&1 fi # run the Geekbench 4 test and grep the test results URL given at the end of the test - GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench4 2>/dev/null | grep "https://browser") + GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench4 --upload 2>/dev/null | grep "https://browser") fi fi @@ -589,10 +589,10 @@ function launch_geekbench { # check if geekbench file exists if test -f "geekbench.license"; then - $GEEKBENCH_PATH/geekbench5 --unlock "`cat geekbench.license` 2>/dev/null + $GEEKBENCH_PATH/geekbench5 --unlock `cat geekbench.license` > /dev/null 2>&1 fi - GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench5 2>/dev/null | grep "https://browser") + GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench5 --upload 2>/dev/null | grep "https://browser") fi fi @@ -614,9 +614,9 @@ function launch_geekbench { sleep 20 # parse the public results page for the single and multi core geekbench scores [[ $VERSION == *5* ]] && GEEKBENCH_SCORES=$(curl -s $GEEKBENCH_URL | grep "div class='score'") || - GEEKBENCH_SCORES=$(curl -s $GEEKBENCH_URL | grep "class='score' rowspan") + GEEKBENCH_SCORES=$(curl -s $GEEKBENCH_URL | grep "span class='score'") GEEKBENCH_SCORES_SINGLE=$(echo $GEEKBENCH_SCORES | awk -v FS="(>|<)" '{ print $3 }') - GEEKBENCH_SCORES_MULTI=$(echo $GEEKBENCH_SCORES | awk -v FS="(<|>)" '{ print $7 }') + GEEKBENCH_SCORES_MULTI=$(echo $GEEKBENCH_SCORES | awk -v FS="(>|<)" '{ print $7 }') # print the Geekbench results echo -en "\r\033[0K"