use of org.btrplace.safeplace.testing.fuzzer.Restriction in project scheduler by btrplace.
the class DSN method discreteVsContinuous.
// @Test
public void discreteVsContinuous() throws Exception {
TestScanner sc = newScanner();
Bench.population = 500;
Bench.scale = 10;
Path path = Paths.get(root, "restriction_stable.csv");
Files.deleteIfExists(path);
boolean first = true;
for (Restriction r : EnumSet.allOf(Restriction.class)) {
if (first) {
Bench.mode = Bench.Mode.SAVE;
first = !first;
} else {
Bench.mode = Bench.Mode.REPLAY;
}
System.out.println("--- Restriction: " + r + "; replay= " + first + " ---");
Bench.report = new CSVReport(path, r.toString());
sc.testGroups("bi").forEach(x -> {
Bench.restrictions = EnumSet.of(r);
System.out.println(x.go());
});
}
// restore
Bench.restrictions = EnumSet.allOf(Restriction.class);
}
use of org.btrplace.safeplace.testing.fuzzer.Restriction 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