diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cd0d0e0 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +.PHONY: bench + + +bench: + dune build --profile benchmark bench/output.csv && \ + cat /dev/urandom | ./_build/default/bench/zpipe | ./_build/default/bench/bench.exe -j diff --git a/bench.Dockerfile b/bench.Dockerfile new file mode 100644 index 0000000..54649ab --- /dev/null +++ b/bench.Dockerfile @@ -0,0 +1,14 @@ +FROM ocaml/opam:debian-10-ocaml-4.13 + +RUN sudo apt-get install -qq -yy --no-install-recommends zlib1g-dev pkg-config + +RUN opam exec -- opam remote add origin https://opam.ocaml.org + +RUN opam exec -- opam update + +COPY --chown=opam:opam . bench-dir + +WORKDIR bench-dir + +RUN opam exec -- opam install -y --deps-only ./decompress-bench.opam + diff --git a/decompress-bench.opam b/decompress-bench.opam new file mode 100644 index 0000000..f1f5db0 --- /dev/null +++ b/decompress-bench.opam @@ -0,0 +1,42 @@ +opam-version: "2.0" +name: "decompress" +maintainer: "Romain Calascibetta " +authors: "Romain Calascibetta " +homepage: "https://github.com/mirage/decompress" +bug-reports: "https://github.com/mirage/decompress/issues" +dev-repo: "git+https://github.com/mirage/decompress.git" +doc: "https://mirage.github.io/decompress/" +license: "MIT" +synopsis: "Implementation of Zlib and GZip in OCaml" +description: """Decompress is an implementation of Zlib and GZip in OCaml + +It provides a pure non-blocking interface to inflate and deflate data flow. +""" + +build: [ "dune" "build" "-p" name "-j" jobs ] +run-test: [ "dune" "runtest" "-p" name "-j" jobs ] + +depends: [ + "ocaml" {>= "4.07.0"} + "dune" {>= "2.8.0"} + "base-bytes" + "bigarray-compat" + "cmdliner" {>= "1.0.0"} + "optint" {>= "0.1.0"} + "checkseum" {>= "0.2.0"} + "bigstringaf" {with-test} + "alcotest" {with-test} + "ctypes" {with-test & >= "0.18.0"} + "fmt" {with-test & >= "0.8.7"} + "camlzip" {>= "1.10" & with-test} + "base64" {>= "3.0.0" & with-test} + "crowbar" {with-test & >= "0.2"} + "rresult" {with-test} + "yojson" + "ppx_deriving_yojson" + "optint" + "landmarks" + "fpath" + "rresult" + "bos" +]