diff options
| author | eunhhu <[email protected]> | 2026-09-26 07:42:00 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-26 07:42:00 +0100 |
| commit | 4ebd1cd9108b135c1216bc6ae17832b77dcacaf3 (patch) | |
| tree | 1cb5f15a59bfe3a9c8ff2c34b2e667993f3102a9 /benchmarks/http/drogon-baseline/build.sh | |
| parent | 9c37c5fa0f58eefe517ca0456324f5618a13b87d (diff) | |
| download | pure-4ebd1cd9108b135c1216bc6ae17832b77dcacaf3.tar.gz pure-4ebd1cd9108b135c1216bc6ae17832b77dcacaf3.zip | |
Compare the HTTP host with drogon and by CPU time
A drogon 1.9 service with the axum baseline's contract joins the benchmark
(memory, fdatasync and crash-safe modes, three IO threads), built from
Debian's packages unpacked under .deps without installing them. drogon
listens once per event loop, so the service picks a free port itself:
with port 0 every loop got a port of its own and the load reached one.
The load generator has one core and saturates near 150k answers a second,
so the harness now also reports answers per second of server CPU time
(all threads). Over three rotated rounds: small GETs 151.6k/s on three
shards (drogon 145.3k, axum 120.9k) and 128k per CPU-second on one thread
(drogon 65k, axum 62k); 1 MiB GETs 2,794/s (axum 1,372, drogon 708);
crash-safe PUTs 5.1-5.8 times axum and 13-30 times drogon; peak RSS
5.0 MiB against 14.4 and 76.5 MiB. --workloads is now a regular expression.
Diffstat (limited to 'benchmarks/http/drogon-baseline/build.sh')
| -rwxr-xr-x | benchmarks/http/drogon-baseline/build.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/benchmarks/http/drogon-baseline/build.sh b/benchmarks/http/drogon-baseline/build.sh new file mode 100755 index 0000000..342f388 --- /dev/null +++ b/benchmarks/http/drogon-baseline/build.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# Build the drogon reference service against Debian's drogon without +# installing anything: the packages are downloaded and unpacked under .deps +# (an old-style rpath, so drogon finds its own dependencies there too). +set -e +cd "$(dirname "$0")" +LIB=.deps/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) +if [ ! -d "$LIB" ]; then + mkdir -p .deps/debs + (cd .deps/debs && apt-get download libdrogon-dev libdrogon1t64 libtrantor-dev libtrantor1 libjsoncpp-dev \ + libhiredis1.1.0 libyaml-cpp0.8 && for deb in *.deb; do dpkg -x "$deb" ..; done) +fi +g++ -O2 -std=c++17 -I.deps/usr/include -I.deps/usr/include/jsoncpp -o drogon-baseline main.cc \ + -L"$LIB" -Wl,--disable-new-dtags,-rpath,"$PWD/$LIB" -Wl,-rpath-link,"$LIB" -ldrogon -ltrantor -l:libjsoncpp.so.26 \ + -lssl -lcrypto -lz -luuid -lpthread |
