[bench] oha 1.17 takes --output-format json; a failed oha run is reported, not hidden
This commit is contained in:
+5
-1
@@ -75,7 +75,11 @@ run() { # engine scenario conns duration url [oha args...]
|
||||
local engine=$1 scenario=$2 c=$3 d=$4 url=$5
|
||||
shift 5
|
||||
local file="$raw/$engine-$scenario-c$c.json"
|
||||
oha --no-tui --insecure -j -c "$c" -z "$d" "$@" "$url" >"$file" 2>/dev/null || true
|
||||
if ! oha --no-tui --insecure --output-format json -c "$c" -z "$d" "$@" "$url" >"$file" 2>"$file.err"; then
|
||||
echo "oha failed for $engine $scenario c$c:" >&2
|
||||
cat "$file.err" >&2
|
||||
fi
|
||||
[ -s "$file.err" ] || rm -f "$file.err"
|
||||
local pid
|
||||
pid=$(pid_of "$(echo "$url" | sed -E 's#.*:([0-9]+)/.*#\1#')")
|
||||
jq -r --arg e "$engine" --arg s "$scenario" --arg c "$c" --arg rss "$(rss_kb "${pid:-0}")" '
|
||||
|
||||
Reference in New Issue
Block a user