From d02eaf5aae0ea753cec16d7731dc4dba8c71f5d8 Mon Sep 17 00:00:00 2001 From: Ciprian Dorin Craciun Date: Sat, 18 Dec 2021 01:30:04 +0200 Subject: [PATCH] [scripts] Minor updates. --- scripts/benchmark.z-run | 41 +++++++++++++++++++++++++++++++---------- scripts/examples.z-run | 31 +++++++++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 12 deletions(-) diff --git a/scripts/benchmark.z-run b/scripts/benchmark.z-run index 6a0ce36..e68f744 100644 --- a/scripts/benchmark.z-run +++ b/scripts/benchmark.z-run @@ -3,10 +3,15 @@ -:: benchmark / server / http / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http "${@}" --processes 1 --threads 1 -:: benchmark / server / http / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http "${@}" --processes 2 --threads 1 -:: benchmark / server / http / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http "${@}" --processes 1 --threads 2 -:: benchmark / server / http / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http "${@}" --processes 2 --threads 2 +:: benchmark / server / http-fast / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http-fast "${@}" --processes 1 --threads 1 +:: benchmark / server / http-fast / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http-fast "${@}" --processes 2 --threads 1 +:: benchmark / server / http-fast / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http-fast "${@}" --processes 1 --threads 2 +:: benchmark / server / http-fast / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http-fast "${@}" --processes 2 --threads 2 + +:: benchmark / server / http-go / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http-go "${@}" --processes 1 --threads 1 +:: benchmark / server / http-go / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http-go "${@}" --processes 2 --threads 1 +:: benchmark / server / http-go / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http-go "${@}" --processes 1 --threads 2 +:: benchmark / server / http-go / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http-go "${@}" --processes 2 --threads 2 :: benchmark / server / https-fast / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-fast "${@}" --processes 1 --threads 1 :: benchmark / server / https-fast / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-fast "${@}" --processes 2 --threads 1 @@ -23,10 +28,15 @@ :: benchmark / server / http2-go / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-go "${@}" --processes 1 --threads 2 :: benchmark / server / http2-go / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-go "${@}" --processes 2 --threads 2 -:: benchmark / server / http2-go-split / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-go-split "${@}" --processes 1 --threads 1 -:: benchmark / server / http2-go-split / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-go-split "${@}" --processes 2 --threads 1 -:: benchmark / server / http2-go-split / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-go-split "${@}" --processes 1 --threads 2 -:: benchmark / server / http2-go-split / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-go-split "${@}" --processes 2 --threads 2 +:: benchmark / server / https-split / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-split "${@}" --processes 1 --threads 1 +:: benchmark / server / https-split / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-split "${@}" --processes 2 --threads 1 +:: benchmark / server / https-split / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-split "${@}" --processes 1 --threads 2 +:: benchmark / server / https-split / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' https-split "${@}" --processes 2 --threads 2 + +:: benchmark / server / http2-split / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-split "${@}" --processes 1 --threads 1 +:: benchmark / server / http2-split / 2x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-split "${@}" --processes 2 --threads 1 +:: benchmark / server / http2-split / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-split "${@}" --processes 1 --threads 2 +:: benchmark / server / http2-split / 2x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http2-split "${@}" --processes 2 --threads 2 :: benchmark / server / http3-quic / 1x1 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http3-quic "${@}" --processes 1 --threads 1 :: benchmark / server / http3-quic / 1x2 :: exec -- "${ZRUN[@]}" ':: benchmark / server / inmem' http3-quic "${@}" --processes 1 --threads 2 @@ -137,17 +147,23 @@ ( http-all ) _arguments+=( --bind 127.9.185.194:8080 + --bind-2 127.9.185.194:8081 --bind-tls 127.9.185.194:8443 --bind-tls-2 127.9.185.194:8444 --bind-quic 127.9.185.194:8445 --http3-alt-svc 127.9.185.194:8445 ) ;; - ( http ) + ( http-fast ) _arguments+=( --bind 127.9.185.194:8080 ) ;; + ( http-go ) + _arguments+=( + --bind-2 127.9.185.194:8080 + ) + ;; ( https-fast ) _arguments+=( --bind-tls 127.9.185.194:8443 @@ -166,7 +182,12 @@ --http1-disable ) ;; - ( http2-go-split ) + ( https-split ) + _arguments+=( + --bind-tls 127.9.185.194:8443 + ) + ;; + ( http2-split ) _arguments+=( --bind-tls 127.9.185.194:8444 ) diff --git a/scripts/examples.z-run b/scripts/examples.z-run index e0c80ab..8c287c4 100644 --- a/scripts/examples.z-run +++ b/scripts/examples.z-run @@ -21,13 +21,41 @@ << examples / hello-world / serve exec -- "${ZRUN[@]}" ':: execute / server / debug' \ - --bind 127.153.215.30:8080 \ + \ --archive ./examples/hello-world.cdb \ --archive-inmem \ --index-all \ + \ --processes 1 \ --threads 1 \ + \ --debug \ + \ + "${@}" \ + # +!! + + +<< examples / hello-world / serve / http-fast + exec -- "${ZRUN[@]}" ':: examples / hello-world / serve' \ + \ + --bind 127.153.215.30:8080 \ + \ + "${@}" \ + # +!! + + +<< examples / hello-world / serve / http-all + exec -- "${ZRUN[@]}" ':: examples / hello-world / serve' \ + \ + --bind 127.153.215.30:8080 \ + --bind-2 127.153.215.30:8081 \ + --bind-tls 127.153.215.30:8443 \ + --bind-tls-2 127.153.215.30:8444 \ + --bind-quic 127.153.215.30:8445 \ + --http3-alt-svc 127.153.215.30:8445 \ + \ "${@}" \ # !! @@ -52,7 +80,6 @@ << examples / huge / serve exec -- "${ZRUN[@]}" ':: execute / server / debug' \ - --bind 127.153.215.30:8080 \ --archive ./.outputs/examples/huge.cdb \ --archive-mmap \ --processes 1 \