Skip to content

Commit 95581df

Browse files
authored
Experimental merl-an benchmark (#1640)
from 3Rafal/merl-an-bench-2
2 parents 06fb0d1 + 20eaf82 commit 95581df

File tree

3 files changed

+240
-0
lines changed

3 files changed

+240
-0
lines changed

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,10 @@ promote:
1919
dune promote
2020

2121
bench:
22+
merl-an benchmark -p /projects/irmin -s 1 --data=merl-an_bench
23+
echo "Top 10 slowest queries:"
24+
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
25+
echo "Benchmark result:"
26+
jq . merl-an_bench/bench.json
2227

2328
.PHONY: all build dev clean test promote bench

bench.Dockerfile

+24
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,27 @@ RUN sudo apt-get -y install jq
77
COPY . .
88
RUN sudo chown -R opam /app
99
RUN eval $(opam env)
10+
11+
# install merlin
12+
RUN opam install .
13+
14+
# install merl-an
15+
RUN echo "uncache this thing"
16+
RUN opam pin -y merl-an https://github.com/pitag-ha/merl-an.git
17+
18+
RUN eval $(opam env)
19+
20+
# create directory for projects to run benchmarks on
21+
RUN sudo mkdir /projects
22+
RUN sudo chown opam /projects
23+
WORKDIR /projects
24+
25+
# build irmin
26+
RUN git clone https://github.com/mirage/irmin.git
27+
WORKDIR /projects/irmin
28+
RUN git checkout 8da4d16e7cc8beddfc8a824feca325426bae08a9
29+
RUN sudo apt install -y gnuplot-x11 libgmp-dev pkg-config libffi-dev
30+
RUN opam switch import /app/bench/irmin.opam.export --no-checksums
31+
RUN opam exec -- dune build
32+
33+
WORKDIR /app

bench/irmin.opam.export

+211
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
opam-version: "2.0"
2+
compiler: ["ocaml-base-compiler.4.14.1"]
3+
roots: [
4+
"irmin.3.7.2"
5+
"irmin-bench.3.7.2"
6+
"irmin-chunk.3.7.2"
7+
"irmin-cli.3.7.2"
8+
"irmin-containers.3.7.2"
9+
"irmin-fs.3.7.2"
10+
"irmin-git.3.7.2"
11+
"irmin-graphql.3.7.2"
12+
"irmin-http.3.7.2"
13+
"irmin-mirage.3.7.2"
14+
"irmin-mirage-git.3.7.2"
15+
"irmin-mirage-graphql.3.7.2"
16+
"irmin-pack.3.7.2"
17+
"irmin-pack-tools.3.7.2"
18+
"irmin-test.3.7.2"
19+
"irmin-tezos.3.7.2"
20+
"libirmin.3.7.2"
21+
"ocaml-base-compiler.4.14.1"
22+
"ppx_irmin.3.7.2"
23+
]
24+
installed: [
25+
"alcotest.1.7.0"
26+
"alcotest-lwt.1.7.0"
27+
"angstrom.0.15.0"
28+
"arp.3.1.0"
29+
"asn1-combinators.0.2.6"
30+
"astring.0.8.5"
31+
"awa.0.3.0"
32+
"awa-mirage.0.3.0"
33+
"base.v0.15.1"
34+
"base-bigarray.base"
35+
"base-bytes.base"
36+
"base-threads.base"
37+
"base-unix.base"
38+
"base64.3.5.1"
39+
"bentov.1"
40+
"bheap.2.0.0"
41+
"bigarray-compat.1.1.0"
42+
"bigstringaf.0.9.1"
43+
"bisect_ppx.2.8.2"
44+
"bos.0.2.1"
45+
"ca-certs.0.2.3"
46+
"ca-certs-nss.3.89.1"
47+
"carton.0.6.0"
48+
"carton-git.0.6.0"
49+
"carton-lwt.0.6.0"
50+
"cf.0.5.0"
51+
"cf-lwt.0.5.0"
52+
"checkseum.0.5.1"
53+
"cmdliner.1.2.0"
54+
"cohttp.5.1.0"
55+
"cohttp-lwt.5.1.0"
56+
"cohttp-lwt-unix.5.1.0"
57+
"conduit.6.2.0"
58+
"conduit-lwt.6.2.0"
59+
"conduit-lwt-unix.6.2.0"
60+
"conf-gmp.4"
61+
"conf-gmp-powm-sec.3"
62+
"conf-gnuplot.0.1"
63+
"conf-libffi.2.0.0"
64+
"conf-pkg-config.2"
65+
"cppo.1.6.9"
66+
"crunch.3.3.1"
67+
"csexp.1.5.2"
68+
"cstruct.6.2.0"
69+
"cstruct-lwt.6.2.0"
70+
"cstruct-unix.6.2.0"
71+
"ctypes.0.20.2"
72+
"ctypes-foreign.0.18.0"
73+
"decompress.1.5.2"
74+
"digestif.1.1.4"
75+
"dispatch.0.5.0"
76+
"dns.7.0.3"
77+
"dns-client.7.0.3"
78+
"dns-client-lwt.7.0.3"
79+
"dns-client-mirage.7.0.3"
80+
"domain-name.0.4.0"
81+
"duff.0.5"
82+
"dune.3.8.3"
83+
"dune-configurator.3.8.3"
84+
"duration.0.2.1"
85+
"either.1.0.0"
86+
"emile.1.1"
87+
"encore.0.8"
88+
"eqaf.0.9"
89+
"ethernet.3.2.0"
90+
"faraday.0.8.2"
91+
"fmt.0.9.0"
92+
"fpath.0.7.3"
93+
"fsevents.0.3.0"
94+
"fsevents-lwt.0.3.0"
95+
"functoria-runtime.4.4.0"
96+
"git.3.13.0"
97+
"git-mirage.3.13.0"
98+
"git-paf.3.13.0"
99+
"git-unix.3.13.0"
100+
"gmap.0.3.0"
101+
"graphql.0.14.0"
102+
"graphql-cohttp.0.14.0"
103+
"graphql-lwt.0.14.0"
104+
"graphql_parser.0.14.0"
105+
"h2.0.10.0"
106+
"happy-eyeballs.0.6.0"
107+
"happy-eyeballs-lwt.0.6.0"
108+
"happy-eyeballs-mirage.0.6.0"
109+
"hex.1.5.0"
110+
"hkdf.1.0.4"
111+
"hpack.0.10.0"
112+
"httpaf.0.7.1"
113+
"hxd.0.3.2"
114+
"index.1.6.2"
115+
"inotify.2.4.1"
116+
"integers.0.7.0"
117+
"ipaddr.5.5.0"
118+
"ipaddr-cstruct.5.5.0"
119+
"ipaddr-sexp.5.5.0"
120+
"irmin-watcher.0.5.0"
121+
"jsonm.1.0.2"
122+
"ke.0.6"
123+
"logs.0.7.0"
124+
"lru.0.3.1"
125+
"lwt.5.6.1"
126+
"lwt-dllist.1.0.1"
127+
"macaddr.5.5.0"
128+
"macaddr-cstruct.5.5.0"
129+
"magic-mime.1.3.0"
130+
"menhir.20230608"
131+
"menhirLib.20230608"
132+
"menhirSdk.20230608"
133+
"metrics.0.4.1"
134+
"metrics-unix.0.4.1"
135+
"mimic.0.0.6"
136+
"mimic-happy-eyeballs.0.0.6"
137+
"mirage-clock.4.2.0"
138+
"mirage-clock-unix.4.2.0"
139+
"mirage-crypto.0.11.1"
140+
"mirage-crypto-ec.0.11.1"
141+
"mirage-crypto-pk.0.11.1"
142+
"mirage-crypto-rng.0.11.1"
143+
"mirage-crypto-rng-lwt.0.11.1"
144+
"mirage-flow.3.0.0"
145+
"mirage-kv.6.1.1"
146+
"mirage-net.4.0.0"
147+
"mirage-random.3.0.0"
148+
"mirage-runtime.4.4.0"
149+
"mirage-time.3.0.0"
150+
"mirage-unix.5.0.1"
151+
"mtime.2.0.0"
152+
"notty.0.2.3"
153+
"num.1.4"
154+
"ocaml.4.14.1"
155+
"ocaml-base-compiler.4.14.1"
156+
"ocaml-compiler-libs.v0.12.4"
157+
"ocaml-config.2"
158+
"ocaml-options-vanilla.1"
159+
"ocaml-syntax-shims.1.0.0"
160+
"ocamlbuild.0.14.2"
161+
"ocamlfind.1.9.6"
162+
"ocamlgraph.2.0.0"
163+
"ocplib-endian.1.2"
164+
"optint.0.3.0"
165+
"paf.0.5.0"
166+
"parsexp.v0.15.0"
167+
"pbkdf.1.2.0"
168+
"pecu.0.6"
169+
"ppx_derivers.1.2.1"
170+
"ppx_deriving.5.2.1"
171+
"ppx_repr.0.6.0"
172+
"ppx_sexp_conv.v0.15.1"
173+
"ppxlib.0.27.0"
174+
"printbox.0.6.1"
175+
"printbox-text.0.6.1"
176+
"progress.0.2.2"
177+
"psq.0.2.1"
178+
"ptime.1.1.0"
179+
"qcheck-alcotest.0.21.1"
180+
"qcheck-core.0.21.1"
181+
"randomconv.0.1.3"
182+
"re.1.10.4"
183+
"repr.0.6.0"
184+
"result.1.5"
185+
"rresult.0.7.0"
186+
"rusage.1.0.0"
187+
"semaphore-compat.1.0.1"
188+
"seq.base"
189+
"sexplib.v0.15.1"
190+
"sexplib0.v0.15.1"
191+
"stdlib-shims.0.3.0"
192+
"stringext.1.6.0"
193+
"tcpip.8.0.0"
194+
"terminal.0.2.2"
195+
"tezos-base58.1.0.0"
196+
"tls.0.17.0"
197+
"tls-lwt.0.17.0"
198+
"tls-mirage.0.17.0"
199+
"topkg.1.0.7"
200+
"uri.4.2.0"
201+
"uri-sexp.4.2.0"
202+
"uucp.15.0.0"
203+
"uuidm.0.9.8"
204+
"uutf.1.0.3"
205+
"vector.1.0.0"
206+
"webmachine.0.7.0"
207+
"x509.0.16.4"
208+
"yaml.3.1.0"
209+
"yojson.2.1.0"
210+
"zarith.1.12"
211+
]

0 commit comments

Comments
 (0)