Skip to content

Budgets

DurieuxPol edited this page Apr 11, 2024 · 5 revisions

Budgets are objects that apply a limitation on your analysis, either a duration limit or a number of mutants limit.
There are currently 4 budgets in MuTalk :

MTFreeBudget

This budget is an empty one, it doesn't restrict anything.

If you don't want to apply any kind of limitation to your analysis, you can choose this budget:

analysis budget: MTFreeBudget new.

MTFixedNumberOfMutantsBudget

This budget restricts the number of mutants to be evaluated by a fixed amount.

  • Giving a number greater than the actual count of mutants comes down to applying a free budget. The analysis won't evaluate imaginary mutants or reevaluate mutants to reach the given number of mutants.
  • Giving 0 or a negative number will result in 0 mutant evaluated, as the mutant evaluation will stop from the start.

If you want to evaluated only 100 mutants for example:

analysis budget: ( MTFixedNumberOfMutantsBudget for: 100 ).

MTPercentageOfMutantsBudget

This budget works similarly than the previous one, but instead uses a percentage of the total amount of mutants. If there are 200 mutants and you give 50%, only 100 will be evaluated.

  • You have to give a percentage rather than a number between 0 and 1. For 20%, give 20 instead of 0.2 for example.
  • Giving a percentage greater than 100 comes down to applying a free budget.
  • Giving 0 or a negative percentage will result in 0 mutant evaluated.
  • If given a percentage that results in a non exact number of mutants, for instance 50% of 65 mutants -> 32.5 mutants, the analysis will evaluate in total the next round number of mutants, here it would be 33 mutants.

If you want to evaluated only 25 percent of mutants for example:

analysis budget: ( MTPercentageOfMutantsBudget for: 25 ).

MTTimeBudget

This is the default budget used by the analysis.
This budget restricts the duration of the analysis.

  • If the given duration finishes during the evaluation of a mutant, the analysis won't stop mid-evaluation but will continue until it is finished, then the analysis will stop. This in particular ensures that the mutation is correctly uninstalled before ending the analysis.
  • If the analysis takes too much time during the phases before the results generation (initial test run, coverage analysis or mutant generation), and the duration finishes during these phases, they will still continue. However when the mutant evaluation will start, it will end instantly and there will be no mutant evaluated. This budget restricts the duration of the whole analysis but can only stop it during the results generation.
    • This is also true if the given duration is 0 or negative.
  • If the analysis takes less time than the given duration, it will end normally.

If you want your analysis to run for 2 minutes:

analysis budget: ( MTTimeBudget for: 2 minutes ).