use of org.btrplace.safeplace.testing.reporting.CSVReport 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.reporting.CSVReport in project scheduler by btrplace.
the class DSN method errors.
// @Test
public void errors() throws Exception {
TestScanner sc = newScanner();
Bench.source = "xp-dsn";
Bench.mode = Bench.Mode.REPLAY;
Bench.population = 1000;
Bench.scale = 5;
Path p = Paths.get(root, "errors.csv");
Files.deleteIfExists(p);
Bench.report = new CSVReport(p, "");
sc.test(Bench.class).stream().forEach(x -> System.out.println(x.go()));
}
use of org.btrplace.safeplace.testing.reporting.CSVReport in project scheduler by btrplace.
the class DSN method specVsCheckers.
// @Test
public void specVsCheckers() throws Exception {
TestScanner sc = newScanner();
Bench.population = 500;
Bench.scale = 10;
Path p = Paths.get(root, "verifier_stable.csv");
Files.deleteIfExists(p);
boolean first = true;
for (Verifier v : new Verifier[] { new SpecVerifier(), new CheckerVerifier() }) {
if (first) {
Bench.mode = Bench.Mode.SAVE;
first = !first;
} else {
Bench.mode = Bench.Mode.REPLAY;
}
System.out.println("--- Verifier: " + v.getClass() + " ---");
Bench.report = new CSVReport(p, v.id());
sc.test(Bench.class).forEach(c -> {
c.verifyWith(v);
System.out.println(c.go().toString());
});
}
}
use of org.btrplace.safeplace.testing.reporting.CSVReport in project scheduler by btrplace.
the class DSN method repairVsRebuild.
// @Test
public void repairVsRebuild() throws Exception {
TestScanner sc = newScanner();
Bench.population = 500;
Bench.scale = 10;
Path path = Paths.get(root, "mode_stable.csv");
Files.deleteIfExists(path);
boolean first = true;
for (boolean repair : new boolean[] { false, true }) {
if (first) {
Bench.mode = Bench.Mode.SAVE;
first = !first;
} else {
Bench.mode = Bench.Mode.REPLAY;
}
System.out.println("--- Repair: " + repair + "; replay= " + first + " ---");
Bench.report = new CSVReport(path, repair ? "enabled" : "disabled");
sc.test(Bench.class).forEach(x -> {
x.schedulerParams().doRepair(true);
System.out.println(x.go());
});
}
}
use of org.btrplace.safeplace.testing.reporting.CSVReport in project scheduler by btrplace.
the class DSN method fuzzingScalability.
// @Test
public void fuzzingScalability() throws Exception {
TestScanner sc = newScanner();
// Warm-up
Bench.transitions = true;
Path p = Paths.get(root, "testing-speed-notrans.csv");
Files.deleteIfExists(p);
/* for (int i = 10; i <= 30; i+=2) {
Bench.transitions = false;
Bench.population = 100;
Bench.scale = i;
System.out.println("--- scaling factor " + i + "; transitions= " + Bench.transitions +" ---");
Bench.report = new CSVReport(p,"");
System.out.println(sc.test(Bench.class).stream().mapToInt(TestCampaign::go).sum());
}*/
// GOGO
p = Paths.get(root, "testing-speed-notrans.csv");
Files.deleteIfExists(p);
Bench.mode = Bench.Mode.DEFAULT;
for (int i = 1; i <= 30; i += 2) {
Bench.transitions = false;
Bench.population = 100;
Bench.scale = i;
System.out.println("--- scaling factor " + i + "; transitions= " + Bench.transitions + " ---");
Bench.report = new CSVReport(p, "");
sc.test(Bench.class).forEach(c -> System.out.println(c.go().toString()));
}
p = Paths.get(root, "testing-speed-trans.csv");
Files.deleteIfExists(p);
for (int i = 1; i <= 30; i += 2) {
System.out.println("--- scaling factor " + i + "; transitions= " + Bench.transitions + " ---");
Bench.transitions = true;
Bench.population = 100;
Bench.scale = i;
Bench.report = new CSVReport(p, "");
sc.test(Bench.class).forEach(c -> System.out.println(c.go().toString()));
}
}
Aggregations