fix(benchmark): use section-prefixed tool URLs for 2.0 route scheme

The 2.0 API routes changed from /api/v1/tools/<toolId> to
/api/v1/tools/<section>/<toolId>. Updated all bench script call sites
to pass section-prefixed tool IDs (e.g. "image/resize" instead of
"resize"), matching the authoritative toolSection() mapping.
This commit is contained in:
SnapOtter
2026-06-21 12:18:47 +08:00
parent 2927e0d4be
commit 76fc695233
3 changed files with 88 additions and 88 deletions
+4 -4
View File
@@ -139,13 +139,13 @@ for config in "${configs[@]}"; do
if start_container "$cpus" "$memory"; then
sleep 2
run_bench "$cpus" "$memory" "resize" "large" "$L" '{"width":800,"fit":"cover"}'
run_bench "$cpus" "$memory" "compress" "targetSize" "$L" '{"mode":"targetSize","targetSizeKb":500}'
run_bench "$cpus" "$memory" "convert" "avif" "$L" '{"format":"avif","quality":50}'
run_bench "$cpus" "$memory" "image/resize" "large" "$L" '{"width":800,"fit":"cover"}'
run_bench "$cpus" "$memory" "image/compress" "targetSize" "$L" '{"mode":"targetSize","targetSizeKb":500}'
run_bench "$cpus" "$memory" "image/convert" "avif" "$L" '{"format":"avif","quality":50}'
run_batch_bench "$cpus" "$memory" 5
run_bench "$cpus" "$memory" "collage" "4img" "NONE" '' \
run_bench "$cpus" "$memory" "image/collage" "4img" "NONE" '' \
|| log "Collage test skipped (needs multi-file support)"
cleanup