Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add process results and attachments in parallel #1965

Merged
merged 5 commits into from Jun 19, 2023

Conversation

nbdnnm
Copy link
Contributor

@nbdnnm nbdnnm commented Apr 4, 2023

Context

Related to the issue described here #1860
In our case, we use allure in pytest, and as result, we have about 2.7 GB of raw data (results+attachments) which should be generated then into a report.
There are about 15k tests, 46k attachments, 90k containers.
It takes around 50min to generate the report in the pipeline, around 30min on my mac m1.
So we dived into that and came to a quick and raw patch that gives us about 10min on mac m1.
The CPU usage jumped 10%->80%.
This PR is a proposal to discuss the approach.
@baev @eroshenkoam look forward to your feedback

Checklist

@CLAassistant
Copy link

CLAassistant commented Apr 4, 2023

CLA assistant check
All committers have signed the CLA.

Signed-off-by: nbdnnm <nbdnnm@gmail.com>
@baev
Copy link
Member

baev commented Apr 28, 2023

Could you please check the results on 2.22.0 release?

Signed-off-by: nbdnnm <nbdnnm@gmail.com>
@baev baev added the type:improvement Change that improves some user experience but can't be considered as a new feature label Apr 28, 2023
Signed-off-by: nbdnnm <nbdnnm@gmail.com>
Signed-off-by: nbdnnm <nbdnnm@gmail.com>
@nbdnnm
Copy link
Contributor Author

nbdnnm commented Apr 28, 2023

I have checked it with our reproduction case, 5200 tests, 10 fixtures per test, attaching it below
2.21.0 runs with it on average 8 min
2.22.0 on average 5 min
my updated patch which was applied on 2.22.0 with the parallel run is under 1 min with CPU 10%->20%
and the generated content looks consistent

so I guess it is still worth considering that
I have updated this PR

repro case, run it like pytest --alluredir=allure-results test.py
test.py.zip

Signed-off-by: nbdnnm <nbdnnm@gmail.com>
@nbdnnm nbdnnm requested a review from baev June 15, 2023 18:54
@nbdnnm
Copy link
Contributor Author

nbdnnm commented Jun 15, 2023

@baev please review

@baev
Copy link
Member

baev commented Jun 15, 2023

@nbdnnm The plan is to include it in the next release (I will try to land 2.23.0 sometime next week)

@baev baev merged commit 84203d0 into allure-framework:master Jun 19, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:generator type:improvement Change that improves some user experience but can't be considered as a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants