Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
jester
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4391562c
authored
Jan 24, 2020
by
Michael Schmid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
little work on simulator logger
parent
ece7d61d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
21 deletions
+19
-21
src/main/java/mvd/jester/App.java
+3
-4
src/main/java/mvd/jester/ResultLogger.java
+11
-14
src/main/java/mvd/jester/TestEnvironment.java
+5
-3
No files found.
src/main/java/mvd/jester/App.java
View file @
4391562c
...
...
@@ -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
.
run
Tes
ts
();
te
.
run
Experimen
ts
();
// SystemSetup setup = SystemSetup.readFromFile(
// "/home/mike/Promotion/projects/eclipse/jester/results/test_this.txt", 16);
...
...
src/main/java/mvd/jester/ResultLogger.java
View file @
4391562c
...
...
@@ -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
<
ResultCollector
<
AbstractTest
>>
testResults
,
Set
<
ResultCollector
<
AbstractSimulator
>>
simResults
)
{
logTests
(
testResults
);
logSimulations
(
simResults
);
}
public
void
logTests
(
Set
<
ResultCollector
<
AbstractTest
>>
results
)
{
logFeasibility
(
results
,
"test"
);
logTaskRatio
(
results
,
"test"
);
}
public
void
logSimulations
(
Set
<
ResultCollector
<
AbstractSimulator
>>
results
)
{
logFeasibility
(
results
,
"sim"
);
logTaskRatio
(
results
,
"sim"
);
}
public
<
T
extends
TypeInterface
>
void
logFeasibility
(
Set
<
ResultCollector
<
T
>>
results
,
String
type
)
{
LocalTime
date
=
LocalTime
.
now
();
...
...
src/main/java/mvd/jester/TestEnvironment.java
View file @
4391562c
...
...
@@ -73,7 +73,7 @@ public class TestEnvironment {
return
this
;
}
public
void
run
Tes
ts
()
{
public
void
run
Experimen
ts
()
{
Set
<
ResultCollector
<
AbstractTest
>>
abstractTestInstances
=
new
HashSet
<>();
Set
<
ResultCollector
<
AbstractSimulator
>>
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
%
10
0
==
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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment