[Bug]: Benchmarks aren't working
Closed this issue · 4 comments
What version of Datahike are you using?
tags/0.4.1484
What version of Java are you using?
openjdk 11.0.14 2022-01-18
What operating system are you using?
Fedora Linux
What database EDN configuration are you using?
file and mem
Describe the bug
The benchmarks are crashing out of the box.
What is the expected behaviour?
It crashes.
How can the behaviour be reproduced?
- Clone the repo (I'm using
main
which as of time of report is97eb463b8c71c60f9ff261db795ee679e4e78767
) - Copy and paste the provided benchmark examples
- Observe that it crashes
All 3 provided examples crash with similar logs. For example:
$ TIMBRE_LEVEL=':warn' clj -M:benchmark run -f :query -q :simple-query -i 10
Compile-time (elision) Timbre min-level: :warn
Syntax error (ClassNotFoundException) compiling at (datahike/impl/entity.cljc:1:1).
datahike.java.IEntity
Full report at:
/tmp/clojure-10710237421126008452.edn
full report: https://gist.github.com/Ramblurr/34eef3edbc3cb0d7735303e1e1a080b4
Could you check what happens if you run clj -T:build compile
and then run the benchmarks again? Looks like somehow the java bindings are used in here but I don't understand why it is used in the benchmark. Maybe @jsmassa has also some ideas on what might go wrong here.
Hi @kordano! I had the same issue as the issue reporter, and can confirm that running clj -T:build compile
beforehand fixes the benchmarks.
Thanks!
Also can confirm that fixes it. Maybe just add a small note to the docs? Compiling beforehand is painless enough.
$ clj -T:build compile
...
$ TIMBRE_LEVEL=':warn' clj -M:benchmark run -f :query -q :simple-query -i 10
...
I am assigning this to me because there should be this in the deps.edn.
I will also improve the docs.