Open danielhuppmann opened 2 years ago
Hello
Thanks for the proposition! Indeed, extracting data is a pain .... I see two points:
Point number 1 can be addressed through the monitor-server-api (see https://github.com/CFMTech/monitor-server-api.git)
However, point 2 needs a development. Should we propose a report with top consumers on a given resource or just dumps the output ? I believe a full report in someone's terminal is not a good idea... but we can definitely report for a given number of test given an axis (cpu, memory or time)
Thanks for the pointer to monitor-server-api
, will take a deeper look - though this seems like a more sophisticated stack than what I had in mind...
About the metrics summary, yes, this is tricky... One thought, though: the main advantage why I would rather use pytest-monitor instead of pytest-benchmark is that is reports across multiple dimensions - so having a summary-output of only one dimension (cpu/memory/time) defeats its main advantage.
One thought, though: the main advantage why I would rather use pytest-monitor instead of pytest-benchmark is that is reports across multiple dimensions - so having a summary-output of only one dimension (cpu/memory/time) defeats its main advantage.
Got your point 👍🏻
Would something along the lines of pytest_terminal_summary
be an option, where we list the tests along with their duration and peak memory usage?
I've made a little proof-of-concept: pytest-resource-usage
. Feel free to copy anything from that experiment.
Hello @joukewitteveen
Thanks for the PoC. You are not the first one requesting this output. I was lacking time lately, but I'll make the implementation next week. I've seen the code you propose, I'll surely inspire myself from this. Thanks for that! 👍🏻
Is your feature request related to a problem? Please describe. Inspecting the database after every test-run to get the output of pytest-monitor seems to be quite a hassle.
Describe the solution you'd like Looking at pytest-benchmark, they write a summary of the output to the console, see screenshot below.
Describe alternatives you've considered None.
Additional context None.