Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marco Perronet
rbf-trace
Commits
05025046
Commit
05025046
authored
Dec 01, 2021
by
Marco Perronet
Browse files
Fix trace generator, update example traces
parent
0674f5c5
Pipeline
#58194
failed with stages
in 43 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scripts/trace_generator/.gitignore
View file @
05025046
...
...
@@ -5,4 +5,6 @@ __pycache__/*
*.py[cod]
*$py.class
_local/*
# Output
debug/output
\ No newline at end of file
scripts/trace_generator/Makefile
View file @
05025046
all
:
python3 trace_generator.py
-o
debug/output/1-periodic_one_perfect.yaml
-u
1000 debug/1-periodic_one_perfect.yaml
python3 trace_generator.py
-o
debug/output/1-periodic_one_perfect.yaml
-u
1000
0000000
debug/1-periodic_one_perfect.yaml
python3 trace_generator.py
-o
debug/output/2-periodic_one_jitter.yaml
-u
2000 debug/2-periodic_one_jitter.yaml
python3 trace_generator.py
-o
debug/output/3-periodic_one_variable_job_cost.yaml
-u
3000 debug/3-periodic_one_variable_job_cost.yaml
python3 trace_generator.py
-o
debug/output/4-periodic_one_variable_job_cost_jitter
-u
4000 debug/4-periodic_one_variable_job_cost_jitter.yaml
\ No newline at end of file
python3 trace_generator.py
-o
debug/output/4-periodic_one_variable_job_cost_jitter
-u
4000 debug/4-periodic_one_variable_job_cost_jitter.yaml
clean
:
rm
debug/output/
*
rmdir
debug/output
scripts/trace_generator/debug/1-periodic_one_perfect.yaml
View file @
05025046
...
...
@@ -2,8 +2,8 @@
task set
:
-
id
:
1
period
:
100
best-case execution time
:
5
0
worst-case execution time
:
5
0
period
:
100
0000000
best-case execution time
:
10000000
0
worst-case execution time
:
10000000
0
priority
:
1
...
\ No newline at end of file
scripts/trace_generator/trace.py
View file @
05025046
import
random
as
rnd
FIRST_TS
=
10_000_000
class
TraceEvent
:
def
__init__
(
self
,
instant
,
etype
,
pid
):
self
.
etype
=
etype
...
...
@@ -20,10 +22,11 @@ def generate_trace(problem_instance, horizon):
assert
t
.
jitter
+
t
.
wcet
<
t
.
period
,
"Self-interference not supported"
trace
=
[]
time
=
0
while
time
<
horizon
:
time
=
FIRST_TS
while
time
<
horizon
+
FIRST_TS
:
arrival
=
time
+
rnd
.
randint
(
0
,
t
.
jitter
)
trace
+=
[
TraceEvent
(
arrival
,
"Activation"
,
t
.
id
)]
trace
+=
[
TraceEvent
(
arrival
,
"Resume"
,
t
.
id
)]
trace
+=
[
TraceEvent
(
arrival
+
rnd
.
randint
(
t
.
bcet
,
t
.
wcet
),
"Deactivation"
,
t
.
id
)]
assert
trace
[
-
1
].
instant
>
trace
[
-
2
].
instant
...
...
src/tools/examples/traces/synthetic/1-periodic_one_perfect.yaml
View file @
05025046
---
-
etype
:
Activation
pid
:
1
instant
:
0
instant
:
10000000
-
etype
:
Resume
pid
:
1
instant
:
10000000
-
etype
:
Deactivation
pid
:
1
instant
:
5
0
instant
:
11000000
0
-
etype
:
Activation
pid
:
1
instant
:
100
instant
:
1010000000
-
etype
:
Resume
pid
:
1
instant
:
1010000000
-
etype
:
Deactivation
pid
:
1
instant
:
1
5
0
instant
:
1
11000000
0
-
etype
:
Activation
pid
:
1
instant
:
200
instant
:
2010000000
-
etype
:
Resume
pid
:
1
instant
:
2010000000
-
etype
:
Deactivation
pid
:
1
instant
:
2
5
0
instant
:
2
11000000
0
-
etype
:
Activation
pid
:
1
instant
:
300
instant
:
3010000000
-
etype
:
Resume
pid
:
1
instant
:
3010000000
-
etype
:
Deactivation
pid
:
1
instant
:
3
5
0
instant
:
3
11000000
0
-
etype
:
Activation
pid
:
1
instant
:
400
instant
:
4010000000
-
etype
:
Resume
pid
:
1
instant
:
4010000000
-
etype
:
Deactivation
pid
:
1
instant
:
4
5
0
instant
:
4
11000000
0
-
etype
:
Activation
pid
:
1
instant
:
500
instant
:
5010000000
-
etype
:
Resume
pid
:
1
instant
:
5010000000
-
etype
:
Deactivation
pid
:
1
instant
:
5
5
0
instant
:
5
11000000
0
-
etype
:
Activation
pid
:
1
instant
:
600
instant
:
6010000000
-
etype
:
Resume
pid
:
1
instant
:
6010000000
-
etype
:
Deactivation
pid
:
1
instant
:
6
5
0
instant
:
6
11000000
0
-
etype
:
Activation
pid
:
1
instant
:
700
instant
:
7010000000
-
etype
:
Resume
pid
:
1
instant
:
7010000000
-
etype
:
Deactivation
pid
:
1
instant
:
7
5
0
instant
:
7
11000000
0
-
etype
:
Activation
pid
:
1
instant
:
800
instant
:
8010000000
-
etype
:
Resume
pid
:
1
instant
:
8010000000
-
etype
:
Deactivation
pid
:
1
instant
:
8
5
0
instant
:
8
11000000
0
-
etype
:
Activation
pid
:
1
instant
:
900
instant
:
9010000000
-
etype
:
Resume
pid
:
1
instant
:
9010000000
-
etype
:
Deactivation
pid
:
1
instant
:
9
5
0
instant
:
9
11000000
0
...
src/tools/examples/traces/synthetic/2-periodic_one_jitter.yaml
View file @
05025046
---
-
etype
:
Activation
pid
:
1
instant
:
12
instant
:
10000016
-
etype
:
Resume
pid
:
1
instant
:
10000016
-
etype
:
Deactivation
pid
:
1
instant
:
6
2
instant
:
1000006
6
-
etype
:
Activation
pid
:
1
instant
:
110
instant
:
10000101
-
etype
:
Resume
pid
:
1
instant
:
10000101
-
etype
:
Deactivation
pid
:
1
instant
:
1
6
0
instant
:
10
000151
-
etype
:
Activation
pid
:
1
instant
:
203
instant
:
10000216
-
etype
:
Resume
pid
:
1
instant
:
10000216
-
etype
:
Deactivation
pid
:
1
instant
:
253
instant
:
10000266
-
etype
:
Activation
pid
:
1
instant
:
307
instant
:
10000304
-
etype
:
Resume
pid
:
1
instant
:
10000304
-
etype
:
Deactivation
pid
:
1
instant
:
35
7
instant
:
10000
35
4
-
etype
:
Activation
pid
:
1
instant
:
418
instant
:
10000404
-
etype
:
Resume
pid
:
1
instant
:
10000404
-
etype
:
Deactivation
pid
:
1
instant
:
468
instant
:
10000454
-
etype
:
Activation
pid
:
1
instant
:
500
instant
:
10000501
-
etype
:
Resume
pid
:
1
instant
:
10000501
-
etype
:
Deactivation
pid
:
1
instant
:
55
0
instant
:
10000
55
1
-
etype
:
Activation
pid
:
1
instant
:
602
instant
:
10000607
-
etype
:
Resume
pid
:
1
instant
:
10000607
-
etype
:
Deactivation
pid
:
1
instant
:
65
2
instant
:
10000
65
7
-
etype
:
Activation
pid
:
1
instant
:
717
instant
:
10000703
-
etype
:
Resume
pid
:
1
instant
:
10000703
-
etype
:
Deactivation
pid
:
1
instant
:
767
instant
:
10000753
-
etype
:
Activation
pid
:
1
instant
:
815
instant
:
10000811
-
etype
:
Resume
pid
:
1
instant
:
10000811
-
etype
:
Deactivation
pid
:
1
instant
:
86
5
instant
:
10000
86
1
-
etype
:
Activation
pid
:
1
instant
:
914
instant
:
10000901
-
etype
:
Resume
pid
:
1
instant
:
10000901
-
etype
:
Deactivation
pid
:
1
instant
:
964
instant
:
10000951
-
etype
:
Activation
pid
:
1
instant
:
1020
instant
:
10001010
-
etype
:
Resume
pid
:
1
instant
:
10001010
-
etype
:
Deactivation
pid
:
1
instant
:
10
7
0
instant
:
10
00106
0
-
etype
:
Activation
pid
:
1
instant
:
1108
instant
:
10001119
-
etype
:
Resume
pid
:
1
instant
:
10001119
-
etype
:
Deactivation
pid
:
1
instant
:
1
158
instant
:
1
0001169
-
etype
:
Activation
pid
:
1
instant
:
1216
instant
:
10001203
-
etype
:
Resume
pid
:
1
instant
:
10001203
-
etype
:
Deactivation
pid
:
1
instant
:
1
266
instant
:
1
0001253
-
etype
:
Activation
pid
:
1
instant
:
1307
instant
:
10001315
-
etype
:
Resume
pid
:
1
instant
:
10001315
-
etype
:
Deactivation
pid
:
1
instant
:
1
357
instant
:
1
0001365
-
etype
:
Activation
pid
:
1
instant
:
1410
instant
:
10001407
-
etype
:
Resume
pid
:
1
instant
:
10001407
-
etype
:
Deactivation
pid
:
1
instant
:
1
460
instant
:
1
0001457
-
etype
:
Activation
pid
:
1
instant
:
1506
instant
:
10001509
-
etype
:
Resume
pid
:
1
instant
:
10001509
-
etype
:
Deactivation
pid
:
1
instant
:
155
6
instant
:
1000
155
9
-
etype
:
Activation
pid
:
1
instant
:
1603
instant
:
10001614
-
etype
:
Resume
pid
:
1
instant
:
10001614
-
etype
:
Deactivation
pid
:
1
instant
:
1
653
instant
:
1
0001664
-
etype
:
Activation
pid
:
1
instant
:
1710
instant
:
10001704
-
etype
:
Resume
pid
:
1
instant
:
10001704
-
etype
:
Deactivation
pid
:
1
instant
:
1
760
instant
:
1
0001754
-
etype
:
Activation
pid
:
1
instant
:
1800
instant
:
10001800
-
etype
:
Resume
pid
:
1
instant
:
10001800
-
etype
:
Deactivation
pid
:
1
instant
:
1850
instant
:
1000
1850
-
etype
:
Activation
pid
:
1
instant
:
1907
instant
:
10001905
-
etype
:
Resume
pid
:
1
instant
:
10001905
-
etype
:
Deactivation
pid
:
1
instant
:
195
7
instant
:
1000
195
5
...
src/tools/examples/traces/synthetic/3-periodic_one_variable_job_cost.yaml
View file @
05025046
---
-
etype
:
Activation
pid
:
1
instant
:
0
instant
:
10000000
-
etype
:
Resume
pid
:
1
instant
:
10000000
-
etype
:
Deactivation
pid
:
1
instant
:
2
1
instant
:
1
0000050
-
etype
:
Activation
pid
:
1
instant
:
100
instant
:
10000100
-
etype
:
Resume
pid
:
1
instant
:
10000100
-
etype
:
Deactivation
pid
:
1
instant
:
1
21
instant
:
1
0000119
-
etype
:
Activation
pid
:
1
instant
:
200
instant
:
10000200
-
etype
:
Resume
pid
:
1
instant
:
10000200
-
etype
:
Deactivation
pid
:
1
instant
:
20
4
instant
:
10000
20
2
-
etype
:
Activation
pid
:
1
instant
:
300
instant
:
10000300
-
etype
:
Resume
pid
:
1
instant
:
10000300
-
etype
:
Deactivation
pid
:
1
instant
:
347
instant
:
10000321
-
etype
:
Activation
pid
:
1
instant
:
400
instant
:
10000400
-
etype
:
Resume
pid
:
1
instant
:
10000400
-
etype
:
Deactivation
pid
:
1
instant
:
436
instant
:
10000424
-
etype
:
Activation
pid
:
1
instant
:
500
instant
:
10000500
-
etype
:
Resume
pid
:
1
instant
:
10000500
-
etype
:
Deactivation
pid
:
1
instant
:
54
3
instant
:
10000
54
2
-
etype
:
Activation
pid
:
1
instant
:
600
instant
:
10000600
-
etype
:
Resume
pid
:
1
instant
:
10000600
-
etype
:
Deactivation
pid
:
1
instant
:
60
5
instant
:
10000
60
2
-
etype
:
Activation
pid
:
1
instant
:
700
instant
:
10000700
-
etype
:
Resume
pid
:
1
instant
:
10000700
-
etype
:
Deactivation
pid
:
1
instant
:
701
instant
:
10000
701
-
etype
:
Activation
pid
:
1
instant
:
800
instant
:
10000800
-
etype
:
Resume
pid
:
1
instant
:
10000800
-
etype
:
Deactivation
pid
:
1
instant
:
806
instant
:
10000850
-
etype
:
Activation
pid
:
1
instant
:
900
instant
:
10000900
-
etype
:
Resume
pid
:
1
instant
:
10000900
-
etype
:
Deactivation
pid
:
1
instant
:
946
instant
:
10000929
-
etype
:
Activation
pid
:
1
instant
:
1000
instant
:
10001000
-
etype
:
Resume
pid
:
1
instant
:
10001000
-
etype
:
Deactivation
pid
:
1
instant
:
103
7
instant
:
10
00104
3
-
etype
:
Activation
pid
:
1
instant
:
1100
instant
:
10001100
-
etype
:
Resume
pid
:
1
instant
:
10001100
-
etype
:
Deactivation
pid
:
1
instant
:
114
2
instant
:
1000
114
3
-
etype
:
Activation
pid
:
1
instant
:
1200
instant
:
10001200
-
etype
:
Resume
pid
:
1
instant
:
10001200
-
etype
:
Deactivation
pid
:
1
instant
:
121
0
instant
:
1000
121
5
-
etype
:
Activation
pid
:
1
instant
:
1300
instant
:
10001300
-
etype
:
Resume
pid
:
1
instant
:
10001300
-
etype
:
Deactivation
pid
:
1
instant
:
1
311
instant
:
1
0001322
-
etype
:
Activation
pid
:
1
instant
:
1400
instant
:
10001400
-
etype
:
Resume
pid
:
1
instant
:
10001400
-
etype
:
Deactivation
pid
:
1
instant
:
1
407
instant
:
1
0001412
-
etype
:
Activation
pid
:
1
instant
:
1500
instant
:
10001500
-
etype
:
Resume
pid
:
1
instant
:
10001500
-
etype
:
Deactivation
pid
:
1
instant
:
1
524
instant
:
1
0001518
-
etype
:
Activation
pid
:
1
instant
:
1600
instant
:
10001600
-
etype
:
Resume
pid
:
1
instant
:
10001600
-
etype
:
Deactivation
pid
:
1
instant
:
1
61
7
instant
:
1
000164
7
-
etype
:
Activation
pid
:
1
instant
:
1700
instant
:
10001700
-
etype
:
Resume
pid
:
1
instant
:
10001700
-
etype
:
Deactivation
pid
:
1
instant
:
1
716
instant
:
1
0001729
-
etype
:
Activation
pid
:
1
instant
:
1800
instant
:
10001800
-
etype
:
Resume
pid
:
1