diff options
author | Franklin Wei <me@fwei.tk> | 2018-06-30 21:05:37 -0400 |
---|---|---|
committer | Franklin Wei <me@fwei.tk> | 2018-06-30 21:05:37 -0400 |
commit | 184259533766b96bf1782448c0fe0efa000db17e (patch) | |
tree | 7826ac5b8dacecc3fca59eafcfa70825cbd27c89 | |
parent | f0519032a59aff4ca9edcb2916e094db93e08942 (diff) | |
download | csaa-184259533766b96bf1782448c0fe0efa000db17e.zip csaa-184259533766b96bf1782448c0fe0efa000db17e.tar.gz csaa-184259533766b96bf1782448c0fe0efa000db17e.tar.bz2 csaa-184259533766b96bf1782448c0fe0efa000db17e.tar.xz |
Add performance test for dummy client/server
-rwxr-xr-x | testall.sh | 8 | ||||
-rwxr-xr-x | testcreate.sh | 2 | ||||
-rwxr-xr-x | testdummy.sh | 7 | ||||
-rwxr-xr-x | testmodify.sh | 4 |
4 files changed, 16 insertions, 5 deletions
@@ -1,3 +1,7 @@ #!/bin/bash -time ./testcreate.sh -time ./testmodify.sh +./server 10 csaa.db --overwrite > /dev/null & +pid=$! +sleep 5 +time ./testcreate.sh ./client +time ./testmodify.sh ./client +kill -SIGINT $! diff --git a/testcreate.sh b/testcreate.sh index 5f3e47f..45a7df2 100755 --- a/testcreate.sh +++ b/testcreate.sh @@ -1,5 +1,5 @@ #!/bin/bash for i in $(seq 1 100) do - ./client -u 1 -k a create > /dev/null + $1 -u 1 -k a create > /dev/null done diff --git a/testdummy.sh b/testdummy.sh new file mode 100755 index 0000000..2623601 --- /dev/null +++ b/testdummy.sh @@ -0,0 +1,7 @@ +#!/bin/bash +./dummy_server 10 csaa.db --overwrite > /dev/null & +pid=$! +sleep 5 +time ./testcreate.sh ./dummy_client +time ./testmodify.sh ./dummy_client +kill -SIGINT $! diff --git a/testmodify.sh b/testmodify.sh index c836ad4..ed69998 100755 --- a/testmodify.sh +++ b/testmodify.sh @@ -1,6 +1,6 @@ #!/bin/bash -./client -u 1 -k a create > /dev/null +$1 -u 1 -k a create > /dev/null for i in $(seq 1 100) do - ./client -u 1 -k a modifyfile -f 1 -i container1/hello-world.tar > /dev/null + $1 -u 1 -k a modifyfile -f 1 -i container1/hello-world.tar > /dev/null done |