-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlocal_tests.sh
More file actions
executable file
·36 lines (27 loc) · 914 Bytes
/
local_tests.sh
File metadata and controls
executable file
·36 lines (27 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
non_builder_counts=(1 2 3 4 5)
parcel_sizes=(512 256)
total_test_count=$(( ${#non_builder_counts[@]} * ${#parcel_sizes[@]} ))
current_test_count=0
rm -rf *.csv
for i in "${non_builder_counts[@]}"
do
for j in "${parcel_sizes[@]}"
do
current_test_count=$((current_test_count+1))
echo ""
echo "[${current_test_count}/${total_test_count}] Running 1b${i}v${i}r${j}p..."
echo ""
mkdir "1b${i}v${i}r${j}p"
# Start recording system stats
top -l 600 -s 1 -o cpu -n 0 > "1b${i}v${i}r${j}p/stats.txt" &
top_pid=$!
timeout 10m ./test.sh 1 ${i} ${i} ${j}
if [ $? -eq 124 ]; then
echo "Test timed out (10 mins). Skipping to next test."
continue
fi
# Stop recording system stats
kill $top_pid
mv *.csv "1b${i}v${i}r${j}p"
done
done