You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Dear, I ran into an inconsistency in results. Actually, the run-time in terminal's output shows different values than total-time in .pymon.
I wonder why the database stores the whole run-time of the tested method (given parameters input). Pytest measures each single round, iteration, etc., providing expected time of a single benchmark.pednatic(...) call. However, total_time incorporates even setup time, i.e. TestClass::setup_stuff.
If this is a feature, can I somehow get run-time per benchmark.pedantic(...)? Sure, I can divide total_time by rounds * iteration but that would not be correct as setup time would be divided as well.
While this is a trivial MWE with a trivial example, my real use-case is dealing with much bigger data. Let's imagine that I'm passing path to a huge file. In the setup phase of a test method, I load this file. Passing a loaded file directly via parametrization/fixtures is possible in theory; however, then, I would need to load all huge files to memory, keep them as parameters, and then use in the test. (Besides memory / cost requirements, it could force some memory processes on background, e.g. swaps).
Desktop (please complete the following information):
linux
Python 3.12.8
pytest-8.3.3
monitor-1.6.1
benchmark-5.1.0
xdist-3.6.1
Additional context
If this is a feature with expected behavior, please refer me to the manual.
The text was updated successfully, but these errors were encountered:
Describe the bug
Dear, I ran into an inconsistency in results. Actually, the
run-time
in terminal's output shows different values thantotal-time
in.pymon
.To Reproduce
executed with
pytest mwe.py -v
output
Expected behavior
Now, when I open
.pymon
file and find that test, I will end up with four runs, each one taking little bit over 10seconds, i.e.
I wonder why the database stores the whole run-time of the tested method (given parameters input). Pytest measures each single round, iteration, etc., providing expected time of a single
benchmark.pednatic(...)
call. However,total_time
incorporates even setup time, i.e.TestClass::setup_stuff
.If this is a feature, can I somehow get run-time per
benchmark.pedantic(...)
? Sure, I can dividetotal_time
byrounds * iteration
but that would not be correct as setup time would be divided as well.While this is a trivial MWE with a trivial example, my real use-case is dealing with much bigger data. Let's imagine that I'm passing path to a huge file. In the setup phase of a test method, I load this file. Passing a loaded file directly via parametrization/fixtures is possible in theory; however, then, I would need to load all huge files to memory, keep them as parameters, and then use in the test. (Besides memory / cost requirements, it could force some memory processes on background, e.g. swaps).
Desktop (please complete the following information):
Additional context
If this is a feature with expected behavior, please refer me to the manual.
The text was updated successfully, but these errors were encountered: