소스 검색

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