Local HTTP server exposing configurable endpoints to be benchmarked for testing purposes.
go run ./...Note: default port is 9999. It can be overrided with flag -port:
go run ./... -port 80Typing the command debug in the CLI while the server is running will output
the count of received requests since it started.
The server exposes two endpoints:
-
GET /Response code: 200 Response body: <empty> Optional query params: - `delay` (`time.Duration`): minimum duration before response - `fib` (`int`): nth element in fibonacci's suite to calculate before reponse -
GET /debugResponse code: 200 Response body: <received requests count> (raw text)
http://localhost:9999?delay=250mshttp://localhost:9999?fib=40http://localhost:9999?fib=40&delay=3s