瀏覽代碼

make noise while running the test if its not there

David 9 年之前
父節點
當前提交
765a500576
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 0 3
      make_noise.sh
  2. 4 1
      speedtest.sh

+ 0 - 3
make_noise.sh

@@ -1,3 +0,0 @@
-#!/bin/bash
-rm -f noise
-dd if=/dev/urandom bs=1M count=10 of=noise

+ 4 - 1
speedtest.sh

@@ -1,5 +1,8 @@
 #!/bin/bash
-
+set -euo pipefail
+if [ ! -f noise ]; then
+	dd if=/dev/urandom bs=1M count=10 of=noise 2>/dev/null
+fi
 size=$(du noise | awk '{ print $1 }')
 start=$(date +%s)
 ssh especificosba.com.ar "cat >/dev/null" < noise