Expose profile/pstats parameters as pytest config variables
See original GitHub issueThere are various arguments which are available when calling profile
and pstats
.
It would be nice to be able to select those via pytest.ini
-
sort: https://docs.python.org/3.6/library/profile.html#pstats.Stats.sort_stats , needs to be comma separated list.
-
percentage or count of lines to print
-
regular expression to limit names of printed functions
-
timeunit
,subcalls
(bool) &builtins
(bool)
As percentage or count and regular expression can be in either order, it might be wiser to have that as a single config option. On the command line, the order can be derived from the arg order. Maybe the same can be done by the order in pytest.ini
… ?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Configuration — pytest documentation
pytest determines a rootdir for each test run which depends on the command line arguments (specified test files, paths) and on the existence...
Read more >Configuration options for isort
To enable this, isort exposes a plethora of options to specify how you want your imports sorted, ... [settings] extend_skip_glob=my_*_module.py,test/* ...
Read more >PyCharm - Run/Debug Configuration: pytest - JetBrains
Use this dialog to create a run/debug configuration for pytests. ... Use this field to specify the list of environment variables and their...
Read more >pytest Documentation - Read the Docs
pytest -h | --help # show help on command line and config file options ... multiple values to a known variable. monkeypatch.setenv and ......
Read more >Extend Config to override ini values programmatically #3311
If --resource-enable is used, my plugin fetch the configuration from a DB ( dict type) and it has to override the pytest.ini variables...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would also be very nice to be able to limit the depth of the graph, and/or exclude functions from system libraries
All args should mention profile (or maybe profiler), to avoid name clashes with other plugins.
You will find it easier to name things as you develop and run it with various settings.