Comments (2)
Hello there. Thank you for the interest!
The problem here, as you correctly stated, is that jmh.core/run
expects data, not fns. This is due to how the generated classes must be compiled to be used with JMH.
In the example code from the README, the data in question is read from the benchmarks.edn
file via clojure.edn/read-string
, which returns simple data. In the case of the :fn
values, namespaced symbols and a list of two symbols and a number: (partial * 0.5)
. The symbols are later resolved, and the expression data is later eval
uated in a JMH subprocess before running the benchmarks.
I wrote a short article here that describes a simplified model of this process if you're curious.
Thank you for opening this issue, however. I don't think I made this as clear as I should have. The exception should also be more descriptive of the actual problem. I have updated the README and added stricter checking of the :fn
values.
Does the above sufficiently address this issue in your opinion? Also, please feel free to ask if you have any questions. Thanks again!
from jmh-clojure.
Much better. Thanks again, it’s working very nicely for me so far. I’m looking forward to adding lots of tests to my benchmark suite.
from jmh-clojure.
Related Issues (9)
- NullPointerException when any benchmark is not matched by :selector predicate HOT 4
- Implicit default selectors to simplify :select usage HOT 2
- Support params in :options map HOT 3
- Support Clojure 1.9 clj tool HOT 3
- "package org.openjdk.jmh.annotations does not exist" when using boot HOT 2
- byte-code level incompatibility with Java <= 13 HOT 11
- Best way to benchmark a variable number of arguments HOT 4
- Valid clj keyword benchmark names are munged to invalid Java method names HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmh-clojure.