Benchmark of different HTTP servers in OCaml
  • OCaml 78.8%
  • Makefile 12%
  • Dune 6.9%
  • Shell 2.3%
Find a file
2020-11-11 14:24:58 +01:00
benchmark Initial commit 2020-11-11 14:24:58 +01:00
result Initial commit 2020-11-11 14:24:58 +01:00
script Initial commit 2020-11-11 14:24:58 +01:00
.gitattributes Initial commit 2020-11-11 14:24:58 +01:00
.gitignore Initial commit 2020-11-11 14:24:58 +01:00
.ocamlformat Initial commit 2020-11-11 14:24:58 +01:00
histogram.png Initial commit 2020-11-11 14:24:58 +01:00
README.md Initial commit 2020-11-11 14:24:58 +01:00

Benchmark HTTP

Benchmark of different HTTP servers in OCaml

Setup your development environment

We pin several packages, so the easiest way to setup you environment is to use the lock file.

make switch

This will create a new local opam switch from the lock file

Install wrk

We use wrk2 to generate the benchmark.

If you're on macOS, you can install wrk2 with:

brew tap jabley/homebrew-wrk2
brew install --HEAD wrk2

Run the benchmarks

To run a benchmark, start the HTTP server that you want to benchmark:

opam exec -- dune exec bin/cohttp_lwt.exe

And in another tab, run the benchmark script:

sh script/run.sh

Results

The results of the benchmarks can be found in result/.

Here's a plot of the historgram with all of them.

It has been generated with hdrhistogram.