1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00

update python example; sanic deps in flake.nix, measure_all.sh

This commit is contained in:
Rene Schallner 2025-02-25 13:31:54 +00:00
parent 7867f32e4d
commit 2529ae7105
3 changed files with 13 additions and 5 deletions

View file

@ -49,6 +49,7 @@
wrk wrk
python3 python3
python3Packages.sanic python3Packages.sanic
python3Packages.setuptools
python3Packages.matplotlib python3Packages.matplotlib
poetry poetry
poetry poetry

View file

@ -8,13 +8,17 @@ fi
SUBJECTS="$1" SUBJECTS="$1"
if [ "$SUBJECTS" = "README" ] ; then if [ "$SUBJECTS" = "README" ] ; then
rm -f wrk/*.perflog rm -f wrk/*.perflog
SUBJECTS="zig-zap go python-sanic rust-axum csharp cpp-beast" SUBJECTS="zig-zap go python-sanic rust-axum csharp cpp-beast"
# above targets csharp and cpp-beast are out of date!
SUBJECTS="zig-zap go python-sanic rust-axum"
fi fi
if [ -z "$SUBJECTS" ] ; then if [ -z "$SUBJECTS" ] ; then
SUBJECTS="zig-zap go python python-sanic rust-bythebook rust-bythebook-improved rust-clean rust-axum csharp cpp-beast" SUBJECTS="zig-zap go python python-sanic rust-bythebook rust-bythebook-improved rust-clean rust-axum csharp cpp-beast"
# above targets csharp and cpp-beast are out of date!
SUBJECTS="zig-zap go python python-sanic rust-bythebook rust-bythebook-improved rust-clean rust-axum"
fi fi
for S in $SUBJECTS; do for S in $SUBJECTS; do

View file

@ -7,10 +7,13 @@ serverPort = 8080
class MyServer(BaseHTTPRequestHandler): class MyServer(BaseHTTPRequestHandler):
def do_GET(self): def do_GET(self):
self.send_response(200) try:
self.send_header("Content-type", "text/html") self.send_response(200)
self.end_headers() self.send_header("Content-type", "text/html")
self.wfile.write(bytes("HI FROM PYTHON!!!", "utf-8")) self.end_headers()
self.wfile.write(bytes("HI FROM PYTHON!!!", "utf-8"))
except:
pass
def log_message(self, format, *args): def log_message(self, format, *args):
return return