repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apply dependencies update
[poolifier.git]
/
benchmarks
/
versus-external-pools
/
bench.sh
diff --git
a/benchmarks/versus-external-pools/bench.sh
b/benchmarks/versus-external-pools/bench.sh
index 34ebb788c0cd90341e9264cc1cb83b19f3c7568f..7a1bb6c0e261fe4095f2dad1b229ac4742ca9e2e 100755
(executable)
--- a/
benchmarks/versus-external-pools/bench.sh
+++ b/
benchmarks/versus-external-pools/bench.sh
@@
-1,8
+1,13
@@
#!/usr/bin/env bash
### The -t argument permit to specify the type of task that you want to benchmark.
#!/usr/bin/env bash
### The -t argument permit to specify the type of task that you want to benchmark.
-### The -s argument permit to specify the size of task that you want to benchmark.
### Supported values are CPU_INTENSIVE, IO_INTENSIVE
### Supported values are CPU_INTENSIVE, IO_INTENSIVE
+### The -s argument permit to specify the size of task that you want to benchmark.
+
+usage() {
+ echo "Usage: $0 [-t <CPU_INTENSIVE|IO_INTENSIVE>] [-s <number of tasks>]" 1>&2
+ exit 1
+}
taskType='CPU_INTENSIVE'
taskSize=5000
taskType='CPU_INTENSIVE'
taskSize=5000
@@
-15,9
+20,17
@@
do
s)
taskSize=${OPTARG}
;;
s)
taskSize=${OPTARG}
;;
+ :)
+ echo "Error: Missing option argument for '-${OPTARG}'" >&2;
+ usage
+ ;;
+ \?)
+ # Invalid option
+ echo "Error: Unknown or invalid option for '-${OPTARG}'" >&2;
+ usage
+ ;;
*|h)
*|h)
- echo "Usage: $0 [-t taskType] [-s taskSize]"
- exit 1
+ usage
;;
esac
done
;;
esac
done