blob: 8c6e51c79d2a901b4d67895f367278dae52cd9fa [file] [log] [blame]
koder aka kdanilov8ad6e812015-03-22 14:42:18 +02001#!/bin/bash
2set -x
3
4TEST_FILE=$1
5OUT_FILE=$2
6NUM_CYCLES=7
koder aka kdanilovee4b2412015-03-22 23:32:35 +02007# 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 kdanilov8ad6e812015-03-22 14:42:18 +020016
17function run_tests(){
gstepanova2d37602015-04-02 19:23:49 +030018 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 kdanilov8ad6e812015-03-22 14:42:18 +020020
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
gstepanova2d37602015-04-02 19:23:49 +030025 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 kdanilov8ad6e812015-03-22 14:42:18 +020028
gstepanova2d37602015-04-02 19:23:49 +030029 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 kdanilov8ad6e812015-03-22 14:42:18 +020032
gstepanova2d37602015-04-02 19:23:49 +030033 sync ; echo 3 > /proc/sys/vm/drop_caches ; python tests/io.py tasks/io_task_randwrite_4kb_1с.cfg --type=fio
koder aka kdanilov8ad6e812015-03-22 14:42:18 +020034
gstepanova2d37602015-04-02 19:23:49 +030035 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 kdanilov8ad6e812015-03-22 14:42:18 +020037 done
38}
39
40run_tests "$FILE_1" 2>&1 | tee "$OUT_FILE"
41
gstepanova2d37602015-04-02 19:23:49 +030042# sudo bash scripts/single_node_test_short.sh file_to_test result.txt