green-coding-solutions / green-metrics-tool

Measure energy and carbon consumption of software
https://metrics.green-coding.io
GNU Affero General Public License v3.0
143 stars 19 forks source link

Add parallel testing #439

Open ribalba opened 10 months ago

ribalba commented 10 months ago

Currently the tests run for quite some time and there are some tests we could run in parallel. There is the great pytest-xdist package that uses workers to run tests in parallel. At some stage we should maybe look through all the tests and categorize them into two groups so we can seep up the ones that we can parallelize.

Very low prio though.

ArneTR commented 10 months ago

Is this still current, given your yesterday discovery that we start containers and use the reporters to derive data?

I see atm no way to parallelize this properly ... at least if you also want proper data output from the metric providers ...

ribalba commented 10 months ago

There are also loads of tests that don't require the containers. All the schema/ parameter checking for example. We could have two categories of test and such speed up the testing. Really nothing we need right now but the tests running so long is quite annoying.

ArneTR commented 10 months ago

I will schedule it in for next week with Dan

ArneTR commented 6 months ago

Improvement done here: https://github.com/green-coding-berlin/green-metrics-tool/pull/637

Test time is now roughly 3 mins.

The onlything that actually takes up time is if the containers are started.

it would be technically possible to start the testing container with a different Id and thus effectively parallelize the tests.

Leaving this issue open for further inspection if tests balloon up again.