Git Product home page Git Product logo

Comments (2)

jgpc42 avatar jgpc42 commented on June 7, 2024

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 evaluated 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.

lbradstreet avatar lbradstreet commented on June 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.