Giter Site home page Giter Site logo

Comments (9)

vstinner avatar vstinner commented on August 25, 2024

doc/examples/ directory contains multiple examples. I didn't use if __name__ == "__main__" in the bench_xxx.py examples, but it should work no? What is your problem with if __name__ == "__main__"?

from pyperf.

Julian avatar Julian commented on August 25, 2024

doc/examples/ directory contains multiple examples.

Cool yeah I saw those, but I meant more for shipping entire "suites" of multiple benchmarks rather than just a single one.

I didn't use if name == "main" in the bench_xxx.py examples, but it should work no? What is your problem with if name == "main"?

Nothing specifically for this case yeah, sorry, that wasn't the main point -- the main point was the above (about how/where to ship suites of benchmarks if you're writing a library) -- e.g., the kind of recommendation I meant was "if you have 5 of those, put 5 files in a benchmark directory, and here's how you run all 5 of them on an ongoing basis", etc. -- does that make more sense?

from pyperf.

Julian avatar Julian commented on August 25, 2024

If not, maybe to elaborate on one of the "not ideal" reasons -- for me the way I set things up, every time I add a new benchmark I have to modify my setup, instead of e.g. automatically discovering the whole suite of benchmarks and running each one. Or more importantly I never bothered to set up tracking of multiple benchmark runs.

from pyperf.

vstinner avatar vstinner commented on August 25, 2024

about how/where to ship suites of benchmarks if you're writing a library

I have not idea on what is the best way to organize a benchmark suite nor how to run it. The largest benchmark suite I worked on was https://pyperformance.readthedocs.io/ which uses its own command line which uses pyperf internally.

from pyperf.

Julian avatar Julian commented on August 25, 2024

from pyperf.

vstinner avatar vstinner commented on August 25, 2024

If you propose a documentation PR, I can review it.

from pyperf.

Julian avatar Julian commented on August 25, 2024

from pyperf.

Julian avatar Julian commented on August 25, 2024

This has sat in my email inbox for a few weeks and I've gotten snowed in with a bunch of other stuff :/

I still hopefully want to send a PR, but I guess going to close this ticket and will just send one over when I get a spare moment (who knows when that'll be but certainly before the next time I try to write a benchmark suite again...).

from pyperf.

vstinner avatar vstinner commented on August 25, 2024

That's ok, no problem ;-)

from pyperf.

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.