Comments (8)
from pyperf.
It is a deliberate choice to make results more reproducible between two computers.
How does blocking environment variables achieve that?
The only situation where such a blanket block of environment variables makes sense is for security reasons and that doesn't apply here. Another reason is changing/removing specific known-broken environment variables, but I don't think that this applies here either. In any case, the latter calls for a blacklist, not a whitelist.
I think that perf
should run commands exactly the same way as in the usual Python environment. I don't see any reason to change environment variables at all, so whatever options are implemented, keeping the environment as-is should be the default.
from pyperf.
How does blocking environment variables achieve that?
For example, if you install a Python module on your machine and it's in the PYTHONPATH, the module can slowdown the benchmark, whereas the same benchmark on a similar machine without this module may be faster. Or it can be the opposite.
It's common that environment variables control optional features.
from pyperf.
@jdemeyer it's unclear to me if you still need to inherit the full environment or not. In case of doubt, I close the issue. If you want to move this forward, you can try to implement a change to add an option to implement that.
from pyperf.
I still think that it's a bug in perf
that environment variables are blocked. But to be honest, I don't care enough to make a PR myself.
from pyperf.
Just one example. Depending on PYTHONPATH, you may or may not get additional .pth files which can change the behavior and impact performances.
from pyperf.
Depending on PYTHONPATH, you may or may not get additional .pth files which can change the behavior and impact performances.
Right, but that's a feature! I don't want code to suddenly behave differently if it's being profiled by perf
. Instead, perf
should just run the code that would normally be run by Python. If I set a PYTHONPATH
, it means that I want to use it.
from pyperf.
(I reopen the discussion.)
perf helps you to identify what's unusal in your benchmark configuration to get reproducible results.
Removing environment variables idea comes from the old Python Grand Unified Benchmark Suite which late became http://pyperformance.readthedocs.io/ : new implementation (written by me) based on perf.
from pyperf.
Related Issues (20)
- 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
- 2.6.2: sphinx warnings `reference target not found`
- Disable pyperf for free-threaded build for a while HOT 1
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.