X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Fversus-external-pools%2Fbench.sh;h=7a1bb6c0e261fe4095f2dad1b229ac4742ca9e2e;hb=37172eb11eeb964f1ecede90eb5711afc130f3f8;hp=34ebb788c0cd90341e9264cc1cb83b19f3c7568f;hpb=7a6a0a967f5d0978d7ad0714616194fe7592f69a;p=poolifier.git diff --git a/benchmarks/versus-external-pools/bench.sh b/benchmarks/versus-external-pools/bench.sh index 34ebb788..7a1bb6c0 100755 --- 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. -### The -s argument permit to specify the size of task that you want to benchmark. ### 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 ] [-s ]" 1>&2 + exit 1 +} taskType='CPU_INTENSIVE' taskSize=5000 @@ -15,9 +20,17 @@ do 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) - echo "Usage: $0 [-t taskType] [-s taskSize]" - exit 1 + usage ;; esac done