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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
run.py
+11
-1
No files found.
run.py
View file @
2e5cf367
...
@@ -14,8 +14,11 @@ def get_exp_cnt(path):
...
@@ -14,8 +14,11 @@ def get_exp_cnt(path):
def
main
():
def
main
():
parser
=
argparse
.
ArgumentParser
(
'Run all the scripts so everything works fine.'
)
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.'
)
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
()
args
=
parser
.
parse_args
()
cwd
=
os
.
getcwd
()
cwd
=
os
.
getcwd
()
...
@@ -29,9 +32,16 @@ def main():
...
@@ -29,9 +32,16 @@ def main():
cnt
=
0
cnt
=
0
remain
=
args
.
experiments
remain
=
args
.
experiments
while
remain
>
0
:
while
remain
>
0
:
if
parser
.
utilization
is
not
None
:
subprocess
.
call
([
'./tasksetgen.py'
,
'--microseconds'
,
'--uniform'
,
'5'
,
subprocess
.
call
([
'./tasksetgen.py'
,
'--microseconds'
,
'--uniform'
,
'5'
,
'--utilization {}:{}'
.
format
(
args
.
utilization
-
0.25
,
args
.
utilization
+
0.25
),
str
(
remain
),
'experiments/ese2016_{}'
.
format
(
cnt
),
str
(
remain
),
'experiments/ese2016_{}'
.
format
(
cnt
),
'experiment_data'
])
'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
)):
for
experiment
in
os
.
listdir
(
'experiments/ese2016_{}'
.
format
(
cnt
)):
subprocess
.
call
([
'./generate.py'
,
subprocess
.
call
([
'./generate.py'
,
'experiments/ese2016_{}'
.
format
(
cnt
)
+
'/'
+
experiment
])
'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