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
19007890
authored
5 years ago
by
Michael Schmid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
found bug, MaiaBertogna Sim works now
parent
11c72917
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
39 deletions
+17
-39
src/main/java/mvd/jester/App.java
+0
-23
src/main/java/mvd/jester/TestEnvironment.java
+2
-7
src/main/java/mvd/jester/simulator/AbstractSimulator.java
+8
-1
src/main/java/mvd/jester/simulator/MaiaBertogna.java
+1
-1
src/main/java/mvd/jester/tests/AbstractTest.java
+4
-1
src/main/java/mvd/jester/tests/MaiaBertogna.java
+1
-3
src/main/java/mvd/jester/tests/SchmidMottok.java
+1
-3
No files found.
src/main/java/mvd/jester/App.java
View file @
19007890
...
...
@@ -9,9 +9,6 @@ import mvd.jester.model.SystemSetup;
*/
public
class
App
{
public
static
void
main
(
String
[]
args
)
{
boolean
runTests
=
false
;
if
(
runTests
)
{
SystemSetup
.
Builder
builder
=
new
SystemSetup
.
Builder
().
setNumberOfProcessors
(
8
);
TestEnvironment
te
=
new
TestEnvironment
(
builder
,
40000
);
...
...
@@ -22,26 +19,6 @@ public class App {
te
.
runTests
();
}
else
{
File
folder
=
new
File
(
"results"
);
for
(
File
f
:
folder
.
listFiles
())
{
SystemSetup
systemSetup
=
SystemSetup
.
fromFile
(
f
.
toPath
().
toString
());
mvd
.
jester
.
simulator
.
MaiaBertogna
mb_sim
=
new
mvd
.
jester
.
simulator
.
MaiaBertogna
(
systemSetup
);
mvd
.
jester
.
tests
.
MaiaBertogna
mb_test
=
new
mvd
.
jester
.
tests
.
MaiaBertogna
(
systemSetup
);
boolean
simCheck
=
mb_sim
.
runSimulation
();
boolean
schedCheck
=
mb_test
.
runSchedulabilityCheck
();
if
(
simCheck
==
false
&&
schedCheck
==
true
)
{
System
.
out
.
println
(
f
.
getName
());
}
}
}
}
}
This diff is collapsed.
Click to expand it.
src/main/java/mvd/jester/TestEnvironment.java
View file @
19007890
...
...
@@ -90,19 +90,14 @@ public class TestEnvironment {
.
compute
(
kv
.
getValue
(),
(
k
,
v
)
->
(
v
==
null
)
?
1
:
v
+
1
);
}
if
(
schedCheck
==
true
&&
simCheck
==
false
)
{
boolean
sched
=
kv
.
getKey
().
runSchedulabilityCheck
();
boolean
sim
=
kv
.
getValue
().
runSimulation
();
if
(
sched
==
true
&&
sim
==
false
)
{
try
(
PrintWriter
out
=
new
PrintWriter
(
"results/manualCheck"
+
checkedTasksets
+
".txt"
))
{
try
(
PrintWriter
out
=
new
PrintWriter
(
"results/manualCheck"
+
checkedTasksets
+
".txt"
))
{
out
.
println
(
systemSetup
);
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"Ähm something went horribly wrong!"
);
}
}
}
}
builder
.
addTask
(
systemSetup
);
utilization
=
this
.
systemSetup
.
getUtilization
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/mvd/jester/simulator/AbstractSimulator.java
View file @
19007890
...
...
@@ -19,7 +19,7 @@ public abstract class AbstractSimulator implements SimulatorInterface {
protected
final
SystemSetup
systemSetup
;
protected
final
Set
<
ProcessorContext
>
processors
;
protected
final
SortedTaskContextSet
readyTasks
;
protected
final
long
hyperPeriod
;
protected
long
hyperPeriod
;
AbstractSimulator
(
SystemSetup
systemSetup
)
{
this
.
systemSetup
=
systemSetup
;
...
...
@@ -32,6 +32,13 @@ public abstract class AbstractSimulator implements SimulatorInterface {
// LongMath.pow(systemSetup.getTasks().last().getPeriod(), 2);
}
protected
void
init
()
{
this
.
readyTasks
.
clear
();
for
(
ProcessorContext
p
:
processors
)
{
p
.
setJob
(
null
);
}
this
.
hyperPeriod
=
systemSetup
.
getTasks
().
last
().
getPeriod
()
*
10
;
}
protected
boolean
releaseTasks
(
long
timeStep
)
{
for
(
Task
t
:
systemSetup
.
getTasks
())
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/mvd/jester/simulator/MaiaBertogna.java
View file @
19007890
...
...
@@ -18,7 +18,7 @@ public class MaiaBertogna extends AbstractSimulator {
@Override
public
boolean
runSimulation
()
{
readyTasks
.
clear
();
init
();
for
(
int
t
=
0
;
t
<
hyperPeriod
;
++
t
)
{
if
(!
releaseTasks
(
t
))
{
return
false
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/mvd/jester/tests/AbstractTest.java
View file @
19007890
...
...
@@ -2,6 +2,7 @@ package mvd.jester.tests;
import
java.util.HashMap
;
import
java.util.Map
;
import
mvd.jester.model.SystemSetup
;
import
mvd.jester.model.Task
;
/**
...
...
@@ -10,8 +11,10 @@ import mvd.jester.model.Task;
public
abstract
class
AbstractTest
implements
TestInterface
{
protected
final
Map
<
Task
,
Long
>
responseTimes
;
protected
final
SystemSetup
systemSetup
;
public
AbstractTest
()
{
public
AbstractTest
(
SystemSetup
systemSetup
)
{
this
.
systemSetup
=
systemSetup
;
this
.
responseTimes
=
new
HashMap
<
Task
,
Long
>();
}
}
This diff is collapsed.
Click to expand it.
src/main/java/mvd/jester/tests/MaiaBertogna.java
View file @
19007890
...
...
@@ -12,10 +12,8 @@ import mvd.jester.model.SystemSetup;
*/
public
class
MaiaBertogna
extends
AbstractTest
{
private
final
SystemSetup
systemSetup
;
public
MaiaBertogna
(
SystemSetup
systemSetup
)
{
this
.
systemSetup
=
systemSetup
;
super
(
systemSetup
)
;
}
@Override
...
...
This diff is collapsed.
Click to expand it.
src/main/java/mvd/jester/tests/SchmidMottok.java
View file @
19007890
...
...
@@ -12,10 +12,8 @@ import mvd.jester.model.SystemSetup;
*/
public
class
SchmidMottok
extends
AbstractTest
{
private
final
SystemSetup
systemSetup
;
public
SchmidMottok
(
SystemSetup
systemSetup
)
{
this
.
systemSetup
=
systemSetup
;
super
(
systemSetup
)
;
}
@Override
...
...
This diff is collapsed.
Click to expand it.
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