Comments (9)
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.
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.
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.
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.
from pyperf.
If you propose a documentation PR, I can review it.
from pyperf.
from pyperf.
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.
That's ok, no problem ;-)
from pyperf.
Related Issues (20)
- Output geometric mean to 0.1% precision HOT 3
- pyperf does not support multiple statements HOT 2
- Allow specifying whether JIT is enabled.
- Link is broken in the documentation HOT 1
- Warn when bench command with `--tracemalloc` HOT 2
- Support collecting cProfile data from a benchmark HOT 1
- Increase default running time per process? HOT 7
- Having trouble while using pypy: pyperf is much slower than timeit HOT 4
- Waiting for runner's bench_func and bench_command functions to complete instead of receiving outputs individually? HOT 5
- Allow for warmup in PEP659 HOT 7
- Pyperf API examples fail when running from a REPL HOT 2
- Propagating PYTHONPATH in tests HOT 2
- Support custom loop factory in bench_async_func
- Instability and slowness after using `pyperf system tune` HOT 2
- Can process run in parallel? HOT 4
- Display additional information through table.
- Programmatically define output file for bench_func HOT 1
- bench_func returning None for all but the first benchmark
- How to programmatically get the output for timeit() or bench_func()? HOT 9
- Add Heirarchical Performance Testing (HPT) technique to `compare_to`? HOT 3
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 pyperf.