test: image_resize

master
Sean McBride 3 years ago
parent ff0aafbd5e
commit 308e6dd109

@ -1 +1,2 @@
res/*
result.jpg

@ -18,4 +18,4 @@ debug:
--eval-command="run spec.json"
client:
curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@flower.jpg" --output "result.jpg" "${HOSTNAME}:10000"
curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@flower.jpg" --output "result.jpg" "${HOSTNAME}:10000/resize"

@ -28,7 +28,7 @@ experiment_client() {
for ((i = 0; i < total_count; i++)); do
ext="$RANDOM"
if curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@flower.jpg" --output "$tmpfs_dir/result_$ext.jpg" "$hostname:10000" 2> /dev/null 1> /dev/null; then
if curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@flower.jpg" --output "$tmpfs_dir/result_$ext.jpg" "$hostname:10000/resize" 2> /dev/null 1> /dev/null; then
pixel_differences="$(compare -identify -metric AE "$tmpfs_dir/result_$ext.jpg" expected_result.jpg null: 2>&1 > /dev/null)"

@ -1,12 +1,16 @@
[
{
"name": "resize",
"path": "resize_image.wasm.so",
"name": "gwu",
"port": 10000,
"expected-execution-us": 5000,
"relative-deadline-us": 50000,
"http-req-size": 1024000,
"http-resp-size": 1024000,
"http-resp-content-type": "image/png"
"routes": [
{
"route": "/resize",
"path": "resize_image.wasm.so",
"expected-execution-us": 5000,
"relative-deadline-us": 50000,
"http-resp-size": 1024000,
"http-resp-content-type": "image/jpeg"
}
]
}
]

Loading…
Cancel
Save