Giter Club home page Giter Club logo

Comments (4)

sharkdp avatar sharkdp commented on May 12, 2024

Thank you for the feedback.

Is it possible to split-up your script into two parts (generate-keys.sh, benchmark.sh)? In this case, you can use the --prepare option of hyperfine:

> hyperfine --prepare ./generate-keys.sh ./benchmark.sh

from hyperfine.

kelunik avatar kelunik commented on May 12, 2024

I thought about that, yes, but I'd still measure the time required to read the keys from disk then. I'm running benchmarks for 1, 10, 100, 100 keys and 1, 10, 100, 1000 messages currently and simply subtract the time required for 1 messages from the final value, which gets me just the time required for 999 message validations without the setup phase.

from hyperfine.

sharkdp avatar sharkdp commented on May 12, 2024

I see. Making the setup phase negligible by increasing the number of iterations is certainly a good idea if you are only interested in the time for a single iteration.

However, I'm afraid that hyperfine is not really the best tool for your use case. It is really about quick, whole-program benchmarks. If you need finer granularity, I think you would be better off by using a benchmarking library from the programming language that you write your script in (or is it a shell script? 😄).

Waiting for a magic string value in the output of the benchmarked program doesn't really sound like a very natural extension for me, to be honest. However, if you have any other ideas on how to make this work, I'm certainly open to hearing about them!

from hyperfine.

sharkdp avatar sharkdp commented on May 12, 2024

Closing this for now. Happy to re-open this, if there is more to discuss.

from hyperfine.

Related Issues (20)

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.