flacoco icon indicating copy to clipboard operation
flacoco copied to clipboard

Flacoco supports parallelisation

Open martinezmatias opened this issue 4 years ago • 6 comments

We can check if Flacoco supports parallelisation on the same JVM. We have a singleton in FlacocoConfig that could impact on the parallelisation.

(Point discussed in #91)

martinezmatias avatar Aug 24 '21 15:08 martinezmatias

Just one thought: what about adding an instance from FlacocoConfig as input in the run methods from Flacoco class. (The instance would be still created by the Main) Then, it will pass the instance to the Runner, which will store it in a field (which currently is affected with the singleton ).

That would allow that each runner have one particular configuration. WDYT?

martinezmatias avatar Aug 24 '21 15:08 martinezmatias

Ok, yes. I agree with that use case.

I will include that change in #91 .

andre15silva avatar Aug 24 '21 18:08 andre15silva

On a second though, we have to make a design decision:

  • Pass the FlacocoConfig to every class who needs it.
  • Parametrize (almost) every class who needs access to the config and pass only the required ones.

The second option is more OOP, but in some cases this will result in a lot of parameters.

WDYT?

andre15silva avatar Aug 25 '21 13:08 andre15silva

Hi @andre15silva

Both options are fine, but I'd chose the first one as it would be easier to develop and maintain.

martinezmatias avatar Aug 25 '21 14:08 martinezmatias

There's also another issue with parallelization. test-runner's entry point is configured statically, so we need to change that too.

andre15silva avatar Aug 26 '21 07:08 andre15silva

Hi @andre15silva

ok, I see.

martinezmatias avatar Aug 26 '21 09:08 martinezmatias