diff --git a/src/main/java/mvd/jester/App.java b/src/main/java/mvd/jester/App.java index 405fe01..0663b05 100644 --- a/src/main/java/mvd/jester/App.java +++ b/src/main/java/mvd/jester/App.java @@ -3,7 +3,6 @@ package mvd.jester; import mvd.jester.model.SystemSetup; import mvd.jester.priority.EarliestDeadlineFirst; import mvd.jester.priority.RateMonotonic; -import mvd.jester.tests.ChwaLee; /** @@ -22,11 +21,11 @@ public class App { te.registerTest(mvd.jester.tests.MaiaBertogna.class); te.registerTest(mvd.jester.tests.ChwaLee.class); - // te.registerSimulator(mvd.jester.simulator.MaiaBertogna.class); - // te.registerSimulator(mvd.jester.simulator.SchmidMottok.class); + te.registerSimulator(mvd.jester.simulator.MaiaBertogna.class); + te.registerSimulator(mvd.jester.simulator.SchmidMottok.class); - te.runTests(); + te.runExperiments(); // SystemSetup setup = SystemSetup.readFromFile( // "/home/mike/Promotion/projects/eclipse/jester/results/test_this.txt", 16); diff --git a/src/main/java/mvd/jester/ResultLogger.java b/src/main/java/mvd/jester/ResultLogger.java index 8db8cd9..a533b59 100644 --- a/src/main/java/mvd/jester/ResultLogger.java +++ b/src/main/java/mvd/jester/ResultLogger.java @@ -11,6 +11,7 @@ import com.google.common.collect.Table; import com.google.common.collect.TreeBasedTable; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVPrinter; +import mvd.jester.simulator.AbstractSimulator; import mvd.jester.tests.AbstractTest; import mvd.jester.utils.Logger; @@ -25,26 +26,22 @@ public class ResultLogger { this.numberOfProcessors = numberOfProcessors; } - // public void logAll() { - // if (!testResults.isEmpty()) { - // logFeasibility(testResults, "test"); - // logFeasibilityRatio(testResults, "test"); - // logTardinessStatistics(testResults, "test"); - // logFailedTardiness(testResults, "test"); - // } - // if (!simulatorResults.isEmpty()) { - // logFeasibility(simulatorResults, "sim"); - // logFeasibilityRatio(simulatorResults, "sim"); - // logTardinessStatistics(simulatorResults, "sim"); - // logFailedTardiness(simulatorResults, "sim"); - // } - // } + public void logAll(Set> testResults, + Set> simResults) { + logTests(testResults); + logSimulations(simResults); + } public void logTests(Set> results) { logFeasibility(results, "test"); logTaskRatio(results, "test"); } + public void logSimulations(Set> results) { + logFeasibility(results, "sim"); + logTaskRatio(results, "sim"); + } + public void logFeasibility(Set> results, String type) { LocalTime date = LocalTime.now(); diff --git a/src/main/java/mvd/jester/TestEnvironment.java b/src/main/java/mvd/jester/TestEnvironment.java index 0753155..3a2cc6f 100644 --- a/src/main/java/mvd/jester/TestEnvironment.java +++ b/src/main/java/mvd/jester/TestEnvironment.java @@ -73,7 +73,7 @@ public class TestEnvironment { return this; } - public void runTests() { + public void runExperiments() { Set> abstractTestInstances = new HashSet<>(); Set> abstractSimulatorInstances = new HashSet<>(); @@ -105,7 +105,8 @@ public class TestEnvironment { } long checkedTasksets = 0; - + System.out.print(Math.round((double) checkedTasksets / numberOfTaskSets * 100) + "% of " + + numberOfTaskSets + " tasksets tested!\r"); while (checkedTasksets < numberOfTaskSets) { builder.rebuild(this.systemSetup); @@ -115,7 +116,7 @@ public class TestEnvironment { && checkedTasksets < numberOfTaskSets) { checkedTasksets++; - if (checkedTasksets % 100 == 0) { + if (checkedTasksets % 10 == 0) { System.out.print(Math.round((double) checkedTasksets / numberOfTaskSets * 100) + "% of " + numberOfTaskSets + " tasksets tested!\r"); } @@ -147,6 +148,7 @@ public class TestEnvironment { ResultLogger resultLogger = new ResultLogger(systemSetup.getNumberOfProcessors()); resultLogger.logTests(abstractTestInstances); + resultLogger.logSimulations(abstractSimulatorInstances); } }