Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Tobias Langer
/
experiment
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
2e5cf367
authored
Nov 21, 2016
by
Tobias Langer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for utilization task generation.
parent
416f5a30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
run.py
+14
-4
No files found.
run.py
View file @
2e5cf367
...
...
@@ -14,8 +14,11 @@ def get_exp_cnt(path):
def
main
():
parser
=
argparse
.
ArgumentParser
(
'Run all the scripts so everything works fine.'
)
parser
.
add_argument
(
'experiments'
,
type
=
int
,
nargs
=
'?'
,
default
=
1
,
parser
.
add_argument
(
'experiments'
,
type
=
int
,
nargs
=
1
,
default
=
1
,
help
=
'The number of experiments to be run.'
)
parser
.
add_argument
(
'utilization'
,
type
=
float
,
nargs
=
'?'
,
default
=
1
,
help
=
'The utilization for the experiments to be run.'
,
default
=
None
)
args
=
parser
.
parse_args
()
cwd
=
os
.
getcwd
()
...
...
@@ -29,9 +32,16 @@ def main():
cnt
=
0
remain
=
args
.
experiments
while
remain
>
0
:
subprocess
.
call
([
'./tasksetgen.py'
,
'--microseconds'
,
'--uniform'
,
'5'
,
str
(
remain
),
'experiments/ese2016_{}'
.
format
(
cnt
),
'experiment_data'
])
if
parser
.
utilization
is
not
None
:
subprocess
.
call
([
'./tasksetgen.py'
,
'--microseconds'
,
'--uniform'
,
'5'
,
'--utilization {}:{}'
.
format
(
args
.
utilization
-
0.25
,
args
.
utilization
+
0.25
),
str
(
remain
),
'experiments/ese2016_{}'
.
format
(
cnt
),
'experiment_data'
])
else
:
subprocess
.
call
([
'./tasksetgen.py'
,
'--microseconds'
,
'--uniform'
,
'5'
,
str
(
remain
),
'experiments/ese2016_{}'
.
format
(
cnt
),
'experiment_data'
])
for
experiment
in
os
.
listdir
(
'experiments/ese2016_{}'
.
format
(
cnt
)):
subprocess
.
call
([
'./generate.py'
,
'experiments/ese2016_{}'
.
format
(
cnt
)
+
'/'
+
experiment
])
...
...
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