koder aka kdanilov | 8ad6e81 | 2015-03-22 14:42:18 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -x |
| 3 | |
| 4 | TEST_FILE=$1 |
| 5 | OUT_FILE=$2 |
| 6 | NUM_CYCLES=7 |
koder aka kdanilov | ee4b241 | 2015-03-22 23:32:35 +0200 | [diff] [blame] | 7 | # TESTS_PER_CYCLE=9 |
| 8 | |
| 9 | # COUNTER=0 |
| 10 | # (( NUM_TESTS=$NUM_CYCLES * $TESTS_PER_CYCLE)) |
| 11 | |
| 12 | # function next() { |
| 13 | # echo "Done $COUNTER tests from $NUM_TESTS" |
| 14 | # (( COUNTER=$COUNTER + 1 )) |
| 15 | # } |
koder aka kdanilov | 8ad6e81 | 2015-03-22 14:42:18 +0200 | [diff] [blame] | 16 | |
| 17 | function run_tests(){ |
gstepanov | a2d3760 | 2015-04-02 19:23:49 +0300 | [diff] [blame] | 18 | OPTS="--type=fio" |
| 19 | sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_randwrite_4kb_1с.cfg --type=fio |
koder aka kdanilov | 8ad6e81 | 2015-03-22 14:42:18 +0200 | [diff] [blame] | 20 | |
| 21 | sync ; echo 3 > /proc/sys/vm/drop_caches ; dd if=/dev/zero of=$TEST_FILE bs=1048576 count=10240 |
| 22 | sync ; echo 3 > /proc/sys/vm/drop_caches ; dd if=/dev/zero of=$TEST_FILE bs=1048576 count=10240 |
| 23 | |
| 24 | for cycle in $(seq $NUM_CYCLES) ; do |
gstepanov | a2d3760 | 2015-04-02 19:23:49 +0300 | [diff] [blame] | 25 | sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_randwrite_4kb_1с.cfg --type=fio |
| 26 | sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_randwrite_4kb_4с.cfg --type=fio |
| 27 | sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_randwrite_4kb_8с.cfg --type=fio |
koder aka kdanilov | 8ad6e81 | 2015-03-22 14:42:18 +0200 | [diff] [blame] | 28 | |
gstepanov | a2d3760 | 2015-04-02 19:23:49 +0300 | [diff] [blame] | 29 | sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_randread_4kb_1с.cfg --type=fio |
| 30 | sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_randread_4kb_1с.cfg --type=fio |
| 31 | sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_randread_4kb_1с.cfg --type=fio |
koder aka kdanilov | 8ad6e81 | 2015-03-22 14:42:18 +0200 | [diff] [blame] | 32 | |
gstepanov | a2d3760 | 2015-04-02 19:23:49 +0300 | [diff] [blame] | 33 | sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_randwrite_4kb_1с.cfg --type=fio |
koder aka kdanilov | 8ad6e81 | 2015-03-22 14:42:18 +0200 | [diff] [blame] | 34 | |
gstepanov | a2d3760 | 2015-04-02 19:23:49 +0300 | [diff] [blame] | 35 | sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_reade_2mb.cfg --type=fio |
| 36 | sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_write_2mb.cfg --type=fio |
koder aka kdanilov | 8ad6e81 | 2015-03-22 14:42:18 +0200 | [diff] [blame] | 37 | done |
| 38 | } |
| 39 | |
| 40 | run_tests "$FILE_1" 2>&1 | tee "$OUT_FILE" |
| 41 | |
gstepanov | a2d3760 | 2015-04-02 19:23:49 +0300 | [diff] [blame] | 42 | # sudo bash scripts/single_node_test_short.sh file_to_test result.txt |