use of org.btrplace.safeplace.testing.fuzzer.ConfigurableFuzzer in project scheduler by btrplace.
the class DefaultTestCampaign method check.
@Override
public ConfigurableFuzzer check(String c) {
String lower = c.toLowerCase();
Optional<Constraint> cstr = cstrs.stream().filter(x -> lower.equalsIgnoreCase(x.id())).findFirst();
if (!cstr.isPresent()) {
throw new IllegalArgumentException("No specification for constraint '" + c + "'");
}
List<Constraint> pre = cores.stream().filter(x -> !lower.equalsIgnoreCase(x.id())).collect(Collectors.toList());
ConfigurableFuzzer f = new DefaultFuzzer(this, cstr.get(), pre);
tcFuzzer = f;
return f;
}
use of org.btrplace.safeplace.testing.fuzzer.ConfigurableFuzzer in project scheduler by btrplace.
the class Bench method thousand.
public static TestCampaign thousand(TestCampaign tc, String cstr, Verifier v) {
tc.reportTo(report);
tc.verifyWith(v);
if (mode == Mode.REPLAY) {
tc.replay(Paths.get(source, cstr + ".json"));
return tc;
}
tc.printProgress(true);
tc.limits().tests(population);
ConfigurableFuzzer f = tc.check(cstr).restriction(EnumSet.allOf(Restriction.class));
f.restriction(restrictions);
if (transitions) {
f.vms(scale).nodes(scale).srcOffNodes(0.1).srcVMs(30, 70, 0).dstVMs(30, 70, 0);
} else {
f.vms(scale).nodes(scale).srcOffNodes(0).dstOffNodes(0).srcVMs(0, 1, 0).dstVMs(0, 1, 0);
}
f.with("nb", 1, 10);
if (mode == Mode.SAVE) {
f.save(Paths.get(source, cstr + ".json").toString());
}
return tc;
}
Aggregations