Skip to content

Commit

Permalink
merl-an benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
3Rafal committed Jul 4, 2023
1 parent 106156f commit b70967b
Show file tree
Hide file tree
Showing 3 changed files with 239 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,10 @@ promote:
dune promote

bench:
merl-an benchmark -p /projects/irmin -s 1 --data=merl-an_bench
echo "Top 10 slowest queries:"
jq -s "[ (map(.sample_id |= tostring)) + (map(.sample_id |= tostring)) | group_by(.sample_id)[] | select(length > 1) | add ] | sort_by( .responses[0].timing.clock) | reverse | .[:10]" merl-an_bench/query_responses.json merl-an_bench/commands.json
echo "Benchmark result:"
jq . merl-an_bench/bench.json

.PHONY: all build dev clean test promote bench
23 changes: 23 additions & 0 deletions bench.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,26 @@ RUN sudo apt-get -y install jq
COPY . .
RUN sudo chown -R opam /app
RUN eval $(opam env)

# install merlin
RUN opam install .

# install merl-an
RUN opam pin -y merl-an https://github.com/pitag-ha/merl-an.git

RUN eval $(opam env)

# create directory for projects to run benchmarks on
RUN sudo mkdir /projects
RUN sudo chown opam /projects
WORKDIR /projects

# build irmin
RUN git clone https://github.com/mirage/irmin.git
WORKDIR /projects/irmin
RUN git checkout 8da4d16e7cc8beddfc8a824feca325426bae08a9
RUN sudo apt install -y gnuplot-x11 libgmp-dev pkg-config libffi-dev
RUN opam switch import /app/bench/irmin.opam.export --no-checksums
RUN opam exec -- dune build

WORKDIR /app
211 changes: 211 additions & 0 deletions bench/irmin.opam.export
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
opam-version: "2.0"
compiler: ["ocaml-base-compiler.4.14.1"]
roots: [
"irmin.3.7.2"
"irmin-bench.3.7.2"
"irmin-chunk.3.7.2"
"irmin-cli.3.7.2"
"irmin-containers.3.7.2"
"irmin-fs.3.7.2"
"irmin-git.3.7.2"
"irmin-graphql.3.7.2"
"irmin-http.3.7.2"
"irmin-mirage.3.7.2"
"irmin-mirage-git.3.7.2"
"irmin-mirage-graphql.3.7.2"
"irmin-pack.3.7.2"
"irmin-pack-tools.3.7.2"
"irmin-test.3.7.2"
"irmin-tezos.3.7.2"
"libirmin.3.7.2"
"ocaml-base-compiler.4.14.1"
"ppx_irmin.3.7.2"
]
installed: [
"alcotest.1.7.0"
"alcotest-lwt.1.7.0"
"angstrom.0.15.0"
"arp.3.1.0"
"asn1-combinators.0.2.6"
"astring.0.8.5"
"awa.0.3.0"
"awa-mirage.0.3.0"
"base.v0.15.1"
"base-bigarray.base"
"base-bytes.base"
"base-threads.base"
"base-unix.base"
"base64.3.5.1"
"bentov.1"
"bheap.2.0.0"
"bigarray-compat.1.1.0"
"bigstringaf.0.9.1"
"bisect_ppx.2.8.2"
"bos.0.2.1"
"ca-certs.0.2.3"
"ca-certs-nss.3.89.1"
"carton.0.6.0"
"carton-git.0.6.0"
"carton-lwt.0.6.0"
"cf.0.5.0"
"cf-lwt.0.5.0"
"checkseum.0.5.1"
"cmdliner.1.2.0"
"cohttp.5.1.0"
"cohttp-lwt.5.1.0"
"cohttp-lwt-unix.5.1.0"
"conduit.6.2.0"
"conduit-lwt.6.2.0"
"conduit-lwt-unix.6.2.0"
"conf-gmp.4"
"conf-gmp-powm-sec.3"
"conf-gnuplot.0.1"
"conf-libffi.2.0.0"
"conf-pkg-config.2"
"cppo.1.6.9"
"crunch.3.3.1"
"csexp.1.5.2"
"cstruct.6.2.0"
"cstruct-lwt.6.2.0"
"cstruct-unix.6.2.0"
"ctypes.0.20.2"
"ctypes-foreign.0.18.0"
"decompress.1.5.2"
"digestif.1.1.4"
"dispatch.0.5.0"
"dns.7.0.3"
"dns-client.7.0.3"
"dns-client-lwt.7.0.3"
"dns-client-mirage.7.0.3"
"domain-name.0.4.0"
"duff.0.5"
"dune.3.8.3"
"dune-configurator.3.8.3"
"duration.0.2.1"
"either.1.0.0"
"emile.1.1"
"encore.0.8"
"eqaf.0.9"
"ethernet.3.2.0"
"faraday.0.8.2"
"fmt.0.9.0"
"fpath.0.7.3"
"fsevents.0.3.0"
"fsevents-lwt.0.3.0"
"functoria-runtime.4.4.0"
"git.3.13.0"
"git-mirage.3.13.0"
"git-paf.3.13.0"
"git-unix.3.13.0"
"gmap.0.3.0"
"graphql.0.14.0"
"graphql-cohttp.0.14.0"
"graphql-lwt.0.14.0"
"graphql_parser.0.14.0"
"h2.0.10.0"
"happy-eyeballs.0.6.0"
"happy-eyeballs-lwt.0.6.0"
"happy-eyeballs-mirage.0.6.0"
"hex.1.5.0"
"hkdf.1.0.4"
"hpack.0.10.0"
"httpaf.0.7.1"
"hxd.0.3.2"
"index.1.6.2"
"inotify.2.4.1"
"integers.0.7.0"
"ipaddr.5.5.0"
"ipaddr-cstruct.5.5.0"
"ipaddr-sexp.5.5.0"
"irmin-watcher.0.5.0"
"jsonm.1.0.2"
"ke.0.6"
"logs.0.7.0"
"lru.0.3.1"
"lwt.5.6.1"
"lwt-dllist.1.0.1"
"macaddr.5.5.0"
"macaddr-cstruct.5.5.0"
"magic-mime.1.3.0"
"menhir.20230608"
"menhirLib.20230608"
"menhirSdk.20230608"
"metrics.0.4.1"
"metrics-unix.0.4.1"
"mimic.0.0.6"
"mimic-happy-eyeballs.0.0.6"
"mirage-clock.4.2.0"
"mirage-clock-unix.4.2.0"
"mirage-crypto.0.11.1"
"mirage-crypto-ec.0.11.1"
"mirage-crypto-pk.0.11.1"
"mirage-crypto-rng.0.11.1"
"mirage-crypto-rng-lwt.0.11.1"
"mirage-flow.3.0.0"
"mirage-kv.6.1.1"
"mirage-net.4.0.0"
"mirage-random.3.0.0"
"mirage-runtime.4.4.0"
"mirage-time.3.0.0"
"mirage-unix.5.0.1"
"mtime.2.0.0"
"notty.0.2.3"
"num.1.4"
"ocaml.4.14.1"
"ocaml-base-compiler.4.14.1"
"ocaml-compiler-libs.v0.12.4"
"ocaml-config.2"
"ocaml-options-vanilla.1"
"ocaml-syntax-shims.1.0.0"
"ocamlbuild.0.14.2"
"ocamlfind.1.9.6"
"ocamlgraph.2.0.0"
"ocplib-endian.1.2"
"optint.0.3.0"
"paf.0.5.0"
"parsexp.v0.15.0"
"pbkdf.1.2.0"
"pecu.0.6"
"ppx_derivers.1.2.1"
"ppx_deriving.5.2.1"
"ppx_repr.0.6.0"
"ppx_sexp_conv.v0.15.1"
"ppxlib.0.27.0"
"printbox.0.6.1"
"printbox-text.0.6.1"
"progress.0.2.2"
"psq.0.2.1"
"ptime.1.1.0"
"qcheck-alcotest.0.21.1"
"qcheck-core.0.21.1"
"randomconv.0.1.3"
"re.1.10.4"
"repr.0.6.0"
"result.1.5"
"rresult.0.7.0"
"rusage.1.0.0"
"semaphore-compat.1.0.1"
"seq.base"
"sexplib.v0.15.1"
"sexplib0.v0.15.1"
"stdlib-shims.0.3.0"
"stringext.1.6.0"
"tcpip.8.0.0"
"terminal.0.2.2"
"tezos-base58.1.0.0"
"tls.0.17.0"
"tls-lwt.0.17.0"
"tls-mirage.0.17.0"
"topkg.1.0.7"
"uri.4.2.0"
"uri-sexp.4.2.0"
"uucp.15.0.0"
"uuidm.0.9.8"
"uutf.1.0.3"
"vector.1.0.0"
"webmachine.0.7.0"
"x509.0.16.4"
"yaml.3.1.0"
"yojson.2.1.0"
"zarith.1.12"
]

0 comments on commit b70967b

Please sign in to comment.