Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important
Please read the description before looking at the code, I've also added some comments to the code itself
I've created a test fixture that gathers some analytics to help analyze the performance of the application.
The idea is to not longer need
django-silkor similar to conduct some manual tests to check/improve performance, just write a test case replicating the workflow or calling the function you want to test using this new fixture and review the results.The fixture will print a summary of the results in the cli after the tests:
It will also generate a full report in markdown in to
performance_report_YYYY-MM-DD_HH-MM.mdso you can review old runs while iterating, this report will also be added to the github summary for the test action, you can check it here https://github.com/RedHatProductSecurity/osidb/actions/runs/19742723923?pr=1147.The tests I wrote in this pull request are just an example of usage, not intended to be merged, we could keep the fixture alone for manual usage or ideally implement some kind of smoke tests that runs on release (detectable by branch name for example) and have these test generate the report, but we should discuss it.
I tried to keep it simple and objective without assuming or suggesting fixes/improvements that could be wrong, is just plain data to help understand the performance of the application.