Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pmtool
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
EYRAUD-DUBOIS Lionel
pmtool
Commits
169306a9
Commit
169306a9
authored
Mar 29, 2019
by
EYRAUD-DUBOIS Lionel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include progress indicator in resultStorage
parent
a9c82d47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
tools/resultStorage.py
tools/resultStorage.py
+6
-4
No files found.
tools/resultStorage.py
View file @
169306a9
...
...
@@ -170,12 +170,14 @@ def MakeStorage(instanceParameters, getInstanceFile, getPlatformFile, commandArg
else
:
groupedByInstances
[
i
]
=
[
a
]
results
=
sum
(
(
self
.
runOne
(
i
,
algs
)
for
(
i
,
algs
)
in
groupedByInstances
.
items
()),
[])
nbInstances
=
len
(
groupedByInstances
)
results
=
sum
(
(
self
.
runOne
(
i
,
algs
,
progress
=
(
1
+
index
)
/
nbInstances
)
for
(
index
,
(
i
,
algs
))
in
enumerate
(
groupedByInstances
.
items
())),
[])
return
results
def
runOne
(
self
,
instance
,
algs
):
def
runOne
(
self
,
instance
,
algs
,
progress
=
None
):
with
open
(
self
.
filename
,
'a'
)
as
output
:
writer
=
csv
.
DictWriter
(
output
,
fieldnames
=
self
.
recordFields
)
...
...
@@ -188,7 +190,7 @@ def MakeStorage(instanceParameters, getInstanceFile, getPlatformFile, commandArg
args
.
append
(
filename
)
args
.
extend
(
sum
([[(
"-b"
if
a
.
isBound
else
"-a"
),
a
.
alg
+
(
":"
+
a
.
params
if
a
.
params
else
""
)]
for
a
in
algs
],
[]))
print
(
"Running: "
+
" "
.
join
(
args
))
print
(
"Running: "
+
(
" [%.1f%%] "
%
(
progress
*
100
)
if
progress
else
""
)
+
" "
.
join
(
args
))
with
subprocess
.
Popen
(
args
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
universal_newlines
=
True
)
as
child
:
reader
=
csv
.
reader
(
child
.
stdout
,
delimiter
=
' '
)
result
=
[]
...
...
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