Skip to content

Commit

Permalink
feat: add OTA speed test in addition to cachefly
Browse files Browse the repository at this point in the history
This allows folks to test both regular speed as well as what it would take to do the OTA.
  • Loading branch information
josegonzalez committed Jun 11, 2023
1 parent 2a5a43e commit 1766727
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions SpeedTest/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
export LD_LIBRARY_PATH="/mnt/SDCARD/.tmp_update/lib:/config/lib:/lib"

dotest() {
download_url_prefix="$1"
# $1 is which file to grab 100, 10, or 1 (megabytes).
megabytes=$1
megabytes="$2"

wget=$(whichwget)

bloburl=https://github.com/josegonzalez/miyoo-speedtest/releases/download/0.0.1/${megabytes}mb.test
bloburl="${download_url_prefix}/${megabytes}mb.test"
blobsize=$(($megabytes * 1024 * 1024))

if which time >/dev/null 2>/dev/null; then
Expand Down Expand Up @@ -139,9 +140,15 @@ whichwget() {
echo wget $options
}

echo "======================================================================"
echo "ROUGH APPROXIMATION"
dotest 1
echo "======================================================================"
echo "====================================================="
echo "Cachefly Speed Test (1mb)"
dotest "http://cachefly.cachefly.net" 1
echo "====================================================="
echo "Sleeping for 5 seconds before next speed test"
sleep 5
echo "====================================================="
echo "OTA Speed Test (1mb)"
dotest "https://github.com/josegonzalez/miyoo-speedtest/releases/download/0.0.1" 1
echo "====================================================="

sleep 15

0 comments on commit 1766727

Please sign in to comment.