summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNullspoon <nullspoon@iohq.net>2014-02-23 15:11:00 -0700
committerNullspoon <nullspoon@iohq.net>2014-02-23 15:11:00 -0700
commita151137db7c84b56b9da2249ffd48451f334b02b (patch)
treeb01c07b14183b0b9d792d22a1fc0f80eacc41ec5
parent50efb663ccb4b4e172b35a02ff9df22245931457 (diff)
downloadforkload-a151137db7c84b56b9da2249ffd48451f334b02b.tar.gz
forkload-a151137db7c84b56b9da2249ffd48451f334b02b.tar.xz
Converted -d,--dest to -t,--targetHEADmaster
Updated all variables referencing ${dest} to ${target} Updated help text to refer to the destination as the target Converted -d,--dest to -t,--target
-rwxr-xr-xforkload16
1 files changed, 8 insertions, 8 deletions
diff --git a/forkload b/forkload
index 65365b1..1906c66 100755
--- a/forkload
+++ b/forkload
@@ -24,10 +24,10 @@ The forkload script provides rudimentary load testing for web applications
so a significant bottleneck will occur due to the fact that a load test is
running off of a single nic. As such, Forkload is intended for small scale load
tests (tens to the low hundreds of clients, depending on your nic and the
-infrastructure between the testing agent and the destination).
+infrastructure between the testing agent and the target).
Arguments:
- -d,--dest Destination to test on
+ -t,--target Target to test
-o,--output File to output the load test results to (default: forkload.out)
-c,--clients Number of virtual clients to test with (default: 1)
-h,--help Prints this help text
@@ -39,7 +39,7 @@ function main {
out="forkload.out"
clients=1
- dest=""
+ target=""
# Parse arguments
for (( i = 0; i < ${#argv[*]}; i++ )); do
@@ -53,15 +53,15 @@ function main {
elif [[ ${val} == "-c" || ${val} == "--clients" ]]; then
i=$((i+1))
clients=${argv[$i]}
- elif [[ ${val} == "-d" || ${val} == "--dest" ]]; then
+ elif [[ ${val} == "-t" || ${val} == "--target" ]]; then
i=$((i+1))
- dest=${argv[$i]}
+ target=${argv[$i]}
fi
done
# Verify needed variables
- if [[ -z ${dest} ]]; then
- echo -e "\nPlease specify a destination URL to test (-d,--dest)."
+ if [[ -z ${target} ]]; then
+ echo -e "\nPlease specify a target URL to test (-t,--target)."
echo -e "See the help text (-h,--help) for more details.\n"
exit
fi
@@ -73,7 +73,7 @@ function main {
for (( i = 0; i < ${clients}; i++ )); do
echo "Client ${i}";
# Fork, time the page download
- { ( time curl -s ${dest} > /dev/null & ) } 2>> ${out}
+ { ( time curl -s ${target} > /dev/null & ) } 2>> ${out}
done
}

Generated by cgit