{"id":16660997,"url":"https://github.com/agrafix/spock-scotty-benchmark","last_synced_at":"2025-06-13T20:33:12.828Z","repository":{"id":17391989,"uuid":"20164334","full_name":"agrafix/Spock-scotty-benchmark","owner":"agrafix","description":"Haskell: Spock vs scotty benchmark","archived":false,"fork":false,"pushed_at":"2017-12-09T22:03:24.000Z","size":10,"stargazers_count":10,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T15:46:23.791Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agrafix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-25T19:59:59.000Z","updated_at":"2020-01-20T02:09:02.000Z","dependencies_parsed_at":"2022-09-23T16:51:50.484Z","dependency_job_id":null,"html_url":"https://github.com/agrafix/Spock-scotty-benchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2FSpock-scotty-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2FSpock-scotty-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2FSpock-scotty-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrafix%2FSpock-scotty-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agrafix","download_url":"https://codeload.github.com/agrafix/Spock-scotty-benchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248092577,"owners_count":21046498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T10:32:54.754Z","updated_at":"2025-04-09T18:51:53.404Z","avatar_url":"https://github.com/agrafix.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Spock vs scotty benchmark\n=================\n\nBenchmark the two Haskell web frameworks [Spock](https://github.com/agrafix/Spock) and [scotty](https://github.com/scotty-web/scotty)\n\nHow to run\n==========\n\nInstall `wrk` HTTP benchmarking tool. On ubuntu run `sudo apt install wrk`.\n\n```bash\n\u003e cabal update\n\u003e cabal install --only-dependencies\n\u003e cabal configure\n\u003e cabal build\n\u003e dist/build/Spock-scotty-benchmark/Spock-scotty-benchmark spock/scotty\n\u003e ./bench.sh\n```\n\nResults\n=====\n\nOn Arch with an i5 (i5-3317U), requests in 30 seconds, higher is better\n\n| Framework | GHC    | Version  | no regex, no captures     | simple captures, no regex | regex captures |\n|-----------|--------|----------|---------------------------|---------------------------|----------------|\n| Spock     | 7.10.1 | 0.7.10.0 | 782906                    | **734979**                | **661227**     |\n| scotty    | 7.10.1 | 0.10.1.0 | **835393**                | 692151                    | 524374         |\n\nSpock\n--------\n```bash\n\u003e ./bench.sh\nBenchmarking http://localhost:8080/echo/hello-world (no regex, no captures)\nRunning 30s test @ http://localhost:8080/echo/hello-world\n  8 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    16.85ms   27.80ms 847.75ms   99.31%\n    Req/Sec     3.28k   627.05    12.67k    94.91%\n  782906 requests in 30.02s, 127.67MB read\nRequests/sec:  26077.42\nTransfer/sec:      4.25MB\nBenchmarking http://localhost:8080/echo/plain/hello (simple captures, no regex)\nRunning 30s test @ http://localhost:8080/echo/plain/hello\n  8 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    18.85ms   39.35ms   1.09s    99.13%\n    Req/Sec     3.13k   706.56    10.78k    96.10%\n  734979 requests in 30.02s, 115.65MB read\nRequests/sec:  24480.10\nTransfer/sec:      3.85MB\nBenchmarking http://localhost:8080/echo/regex/42 (regex captures)\nRunning 30s test @ http://localhost:8080/echo/regex/42\n  8 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    22.38ms   55.12ms   1.30s    98.94%\n    Req/Sec     2.77k   625.44    13.08k    94.20%\n  661227 requests in 30.02s, 102.16MB read\nRequests/sec:  22024.47\nTransfer/sec:      3.40MB\n```\n\nscotty\n--------\n```bash\n\u003e ./bench.sh\nBenchmarking http://localhost:8080/echo/hello-world (no regex, no captures)\nRunning 30s test @ http://localhost:8080/echo/hello-world\n  8 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    15.87ms   27.48ms 866.32ms   99.32%\n    Req/Sec     3.53k   493.42    10.23k    95.83%\n  835393 requests in 30.03s, 136.23MB read\nRequests/sec:  27820.09\nTransfer/sec:      4.54MB\nBenchmarking http://localhost:8080/echo/plain/hello (simple captures, no regex)\nRunning 30s test @ http://localhost:8080/echo/plain/hello\n  8 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    19.07ms   30.67ms 955.54ms   99.25%\n    Req/Sec     2.90k   550.93    10.98k    95.08%\n  692151 requests in 30.02s, 108.91MB read\nRequests/sec:  23054.96\nTransfer/sec:      3.63MB\nBenchmarking http://localhost:8080/echo/regex/42 (regex captures)\nRunning 30s test @ http://localhost:8080/echo/regex/42\n  8 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    28.64ms   68.53ms   1.52s    98.73%\n    Req/Sec     2.25k   589.30    10.99k    95.90%\n  524374 requests in 30.02s, 81.01MB read\nRequests/sec:  17465.17\nTransfer/sec:      2.70MB\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrafix%2Fspock-scotty-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagrafix%2Fspock-scotty-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrafix%2Fspock-scotty-benchmark/lists"}