From f164d9d23e295469ae5db8550bbd2a3a12012b3f Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Mon, 23 Mar 2026 13:39:01 +0100 Subject: [PATCH] Add /slow endpoint to benchmark app Add endpoint with 10ms simulated I/O for latency testing. --- benchmarks/simple_app.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/benchmarks/simple_app.py b/benchmarks/simple_app.py index 1eaa50da..129b8e98 100644 --- a/benchmarks/simple_app.py +++ b/benchmarks/simple_app.py @@ -4,12 +4,18 @@ # Simple WSGI app for benchmarking +import time + + def application(environ, start_response): """Basic hello world response.""" path = environ.get('PATH_INFO', '/') if path == '/large': body = b'X' * 65536 # 64KB + elif path == '/slow': + time.sleep(0.01) # 10ms simulated I/O + body = b'Slow response' else: body = b'Hello, World!'