Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load tests #854

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/corla-test-credentials.psql
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
delete from administrator;
insert into administrator (id, username, full_name, last_login_time, last_logout_time, county_id, type, version) values
(-1, 'stateadmin1', 'State Administrator 1', null, null, null, 'STATE', 0),
(-2, 'stateadmin2', 'State Administrator 2', null, null, null, 'STATE', 0),
Expand Down
3 changes: 3 additions & 0 deletions test/load_tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.out
*.err
*.log
Binary file added test/load_tests/100.csv.gz
Binary file not shown.
15 changes: 15 additions & 0 deletions test/load_tests/12_counties_uploads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2 3 4; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f large_cvrs.csv -F large_manifest.csv > $c.log &
done &
for c in 5 6 7 8; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done &
for c in 9 10 11 12; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f small_cvrs.csv -F small_manifest.csv > $c.log &
done &
for job in `jobs -p`; do
wait $job
done

8 changes: 8 additions & 0 deletions test/load_tests/16-cdos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://192.168.24.43/api/ reset dos_init > 0.log
for c in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do
./main.py -u http://192.168.24.43/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
8 changes: 8 additions & 0 deletions test/load_tests/16.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
9 changes: 9 additions & 0 deletions test/load_tests/1_huge_county_cdos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
./main.py -u http://192.168.24.43/api/ reset dos_init > 0.log
for c in 1; do
./main.py -u http://192.168.24.43/api/ -c $c county_setup -f huge_cvrs.csv -F huge_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done

9 changes: 9 additions & 0 deletions test/load_tests/1_huge_county_upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f huge_cvrs.csv -F huge_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done

9 changes: 9 additions & 0 deletions test/load_tests/1_large_county_uploads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f large_cvrs.csv -F large_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done

20 changes: 20 additions & 0 deletions test/load_tests/2-64-cdos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
time 2-cdos.sh; # 5 5 4
time 2-cdos.sh;
time 2-cdos.sh;
time 2-cdos.sh;
time 4-cdos.sh; # 8 7 9
time 4-cdos.sh;
time 4-cdos.sh;
time 8-cdos.sh; # 11 11 13
time 8-cdos.sh;
time 8-cdos.sh;
time 16-cdos.sh; # 23 22 24
time 16-cdos.sh;
time 16-cdos.sh;
time 32-cdos.sh; # 67 40 57
time 32-cdos.sh;
time 32-cdos.sh;
time 64-cdos.sh; # 159
time 64-cdos.sh;
time 64-cdos.sh;
20 changes: 20 additions & 0 deletions test/load_tests/2-64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
time 2.sh;
time 2.sh;
time 2.sh;
time 2.sh;
time 4.sh;
time 4.sh;
time 4.sh;
time 8.sh;
time 8.sh;
time 8.sh;
time 16.sh;
time 16.sh;
time 16.sh;
time 32.sh;
time 32.sh;
time 32.sh;
time 64.sh;
time 64.sh;
time 64.sh;
8 changes: 8 additions & 0 deletions test/load_tests/2-cdos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://192.168.24.43/api/ reset dos_init > 0.log
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to replace these scripts with scripts that take a command line parameter for the hostname?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A parameter would be better. Or my approach in autotest2.sh is to pass an environment variable, $URL.

for c in 1 2; do
./main.py -u http://192.168.24.43/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
8 changes: 8 additions & 0 deletions test/load_tests/2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
Binary file added test/load_tests/20.csv.gz
Binary file not shown.
29 changes: 29 additions & 0 deletions test/load_tests/20_counties_uploads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/sh
# argument 1 is delay between simulated user interactions (in seconds)
# argument 2 is delay between county starts (in seconds)
if [ "$#" != "2" ]; then
echo "Usage: upload_script.sh <user delay> <county start delay>"
echo "See script source for details."
exit
fi
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2 3 4 5 6 7 8; do
./main.py -u http://corla-test.galois.com/api/ -T $1 -c $c county_setup -f small_cvrs.csv -F small_manifest.csv > $c.log &
sleep $((RANDOM % $2 + 1));
done &
for c in 9 10 11 12 13 14 15 16; do
./main.py -u http://corla-test.galois.com/api/ -T $1 -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
sleep $((RANDOM % $2 + 1));
done &
for c in 17 18; do
./main.py -u http://corla-test.galois.com/api/ -T $1 -c $c county_setup -f large_cvrs.csv -F large_manifest.csv > $c.log &
sleep $((RANDOM % $2 + 1));
done &
for c in 19 20; do
./main.py -u http://corla-test.galois.com/api/ -T 3 -c $c county_setup -f huge_cvrs.csv -F huge_manifest.csv > $c.log &
sleep $((RANDOM % 3 + 1));
done &
for job in `jobs -p`; do
wait $job
done

Binary file added test/load_tests/250.csv.gz
Binary file not shown.
Binary file added test/load_tests/30.csv.gz
Binary file not shown.
Binary file added test/load_tests/300.csv.gz
Binary file not shown.
8 changes: 8 additions & 0 deletions test/load_tests/32-cdos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://192.168.24.43/api/ reset dos_init > 0.log
for c in 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; do
./main.py -u http://192.168.24.43/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
8 changes: 8 additions & 0 deletions test/load_tests/32.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 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; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
8 changes: 8 additions & 0 deletions test/load_tests/4-cdos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://192.168.24.43/api/ reset dos_init > 0.log
for c in 1 2 3 4; do
./main.py -u http://192.168.24.43/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
8 changes: 8 additions & 0 deletions test/load_tests/4.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2 3 4; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
9 changes: 9 additions & 0 deletions test/load_tests/4_large_counties_uploads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2 3 4; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f large_cvrs.csv -F large_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done

8 changes: 8 additions & 0 deletions test/load_tests/4_medium_counties_uploads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2 3 4; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
Binary file added test/load_tests/50.csv.gz
Binary file not shown.
Binary file added test/load_tests/500.csv.gz
Binary file not shown.
41 changes: 41 additions & 0 deletions test/load_tests/58_counties_cdos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh
# argument 1 is delay between simulated user interactions (in seconds)
# argument 2 is delay between county starts (in seconds)
if [ "$#" != "2" ]; then
echo "Usage: upload_script.sh <user delay> <county start delay>"
echo "See script source for details."
exit
fi
./main.py -u http://192.168.24.43/api/ reset dos_init > 0.log
for c in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
./main.py -u http://192.168.24.43/api/ -T $1 -c $c county_setup -f 20.csv -F small_manifest.csv > $c.log &
sleep $((RANDOM % $2 + 1));
done &
for c in 21 22 23 24 25 26 27 28 29 30; do
./main.py -u http://192.168.24.43/api/ -T $1 -c $c county_setup -f 30.csv -F medium_manifest.csv > $c.log &
sleep $((RANDOM % $2 + 1));
done &
for c in 31 32 33 34 35 36 37 38 39 40; do
./main.py -u http://192.168.24.43/api/ -T $1 -c $c county_setup -f 50.csv -F large_manifest.csv > $c.log &
sleep $((RANDOM % $2 + 1));
done &
for c in 41 42 43 44 45; do
./main.py -u http://192.168.24.43/api/ -T 3 -c $c county_setup -f 100.csv -F huge_manifest.csv > $c.log &
sleep $((RANDOM % 3 + 1));
done &
for c in 46 47 48 49; do
./main.py -u http://192.168.24.43/api/ -T 3 -c $c county_setup -f 250.csv -F huge_manifest.csv > $c.log &
sleep $((RANDOM % 3 + 1));
done &
for c in 50 51 52 53 54; do
./main.py -u http://192.168.24.43/api/ -T 3 -c $c county_setup -f 300.csv -F huge_manifest.csv > $c.log &
sleep $((RANDOM % 3 + 1));
done &
for c in 55 56 57 58; do
./main.py -u http://192.168.24.43/api/ -T 3 -c $c county_setup -f 500.csv -F huge_manifest.csv > $c.log &
sleep $((RANDOM % 3 + 1));
done &
for job in `jobs -p`; do
wait $job
done

41 changes: 41 additions & 0 deletions test/load_tests/58_counties_uploads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh
# argument 1 is delay between simulated user interactions (in seconds)
# argument 2 is delay between county starts (in seconds)
if [ "$#" != "2" ]; then
echo "Usage: upload_script.sh <user delay> <county start delay>"
echo "See script source for details."
exit
fi
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
./main.py -u http://corla-test.galois.com/api/ -T $1 -c $c county_setup -f 20.csv -F small_manifest.csv > $c.log &
sleep $((RANDOM % $2 + 1));
done &
for c in 21 22 23 24 25 26 27 28 29 30; do
./main.py -u http://corla-test.galois.com/api/ -T $1 -c $c county_setup -f 30.csv -F medium_manifest.csv > $c.log &
sleep $((RANDOM % $2 + 1));
done &
for c in 31 32 33 34 35 36 37 38 39 40; do
./main.py -u http://corla-test.galois.com/api/ -T $1 -c $c county_setup -f 50.csv -F large_manifest.csv > $c.log &
sleep $((RANDOM % $2 + 1));
done &
for c in 41 42 43 44 45; do
./main.py -u http://corla-test.galois.com/api/ -T 3 -c $c county_setup -f 100.csv -F huge_manifest.csv > $c.log &
sleep $((RANDOM % 3 + 1));
done &
for c in 46 47 48 49; do
./main.py -u http://corla-test.galois.com/api/ -T 3 -c $c county_setup -f 250.csv -F huge_manifest.csv > $c.log &
sleep $((RANDOM % 3 + 1));
done &
for c in 50 51 52 53 54; do
./main.py -u http://corla-test.galois.com/api/ -T 3 -c $c county_setup -f 300.csv -F huge_manifest.csv > $c.log &
sleep $((RANDOM % 3 + 1));
done &
for c in 55 56 57 58; do
./main.py -u http://corla-test.galois.com/api/ -T 3 -c $c county_setup -f 500.csv -F huge_manifest.csv > $c.log &
sleep $((RANDOM % 3 + 1));
done &
for job in `jobs -p`; do
wait $job
done

9 changes: 9 additions & 0 deletions test/load_tests/5_huge_county_cdos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
./main.py -u http://192.168.24.43/api/ reset dos_init > 0.log
for c in 1 2 3 4 5; do
./main.py -u http://192.168.24.43/api/ -c $c county_setup -f huge_cvrs.csv -F huge_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done

9 changes: 9 additions & 0 deletions test/load_tests/5_huge_county_uploads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2 3 4 5; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f huge_cvrs.csv -F huge_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done

8 changes: 8 additions & 0 deletions test/load_tests/64-cdos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://192.168.24.43/api/ reset dos_init > 0.log
for c in 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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64; do
./main.py -u http://192.168.24.43/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
8 changes: 8 additions & 0 deletions test/load_tests/64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
8 changes: 8 additions & 0 deletions test/load_tests/6_large_counties_uploads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2 3 4 5 6; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f large_cvrs.csv -F large_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
9 changes: 9 additions & 0 deletions test/load_tests/6_medium_counties_uploads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api reset dos_init > 0.log
for c in 1 2 3 4 5 6; do
./main.py -u http://corla-test.galois.com/api -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done

8 changes: 8 additions & 0 deletions test/load_tests/8-cdos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://192.168.24.43/api/ reset dos_init > 0.log
for c in 1 2 3 4 5 6 7 8; do
./main.py -u http://192.168.24.43/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
8 changes: 8 additions & 0 deletions test/load_tests/8.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
./main.py -u http://corla-test.galois.com/api/ reset dos_init > 0.log
for c in 1 2 3 4 5 6 7 8; do
./main.py -u http://corla-test.galois.com/api/ -c $c county_setup -f medium_cvrs.csv -F medium_manifest.csv > $c.log &
done
for job in `jobs -p`; do
wait $job
done
Loading