Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philippe SWARTVAGHER
memory-contention
Commits
ef4919fc
Commit
ef4919fc
authored
Nov 23, 2021
by
Philippe SWARTVAGHER
Browse files
FilesParser: handle files with first lines not starting with #
parent
585511c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
plot/comm_comp.py
View file @
ef4919fc
...
...
@@ -380,7 +380,15 @@ class FilesParser:
run_values
=
{}
for
k
in
infos
:
meet_sharp
=
False
for
l
in
lines
:
if
l
.
startswith
(
"# "
):
meet_sharp
=
True
elif
meet_sharp
:
# we parsed all the header of the file that could contains these informations,
# no need to parse the whole file
break
if
l
.
startswith
(
infos
[
k
]):
v
=
int
(
l
[
l
.
find
(
":"
)
+
1
:].
split
()[
0
])
if
self
.
machine
[
k
]
is
None
:
...
...
@@ -389,21 +397,20 @@ class FilesParser:
print
(
"Warning: {} is different ({} vs {})"
.
format
(
k
,
self
.
machine
[
'k'
],
v
))
break
elif
not
l
.
startswith
(
"# "
):
# we parsed the beginning of the file that could contains these informations,
# no need to parse the whole file
break
break
for
k
in
run
:
meet_sharp
=
False
for
l
in
lines
:
if
l
.
startswith
(
"# "
):
meet_sharp
=
True
elif
meet_sharp
:
# we parsed all the header of the file that could contains these informations,
# no need to parse the whole file
break
if
l
.
startswith
(
run
[
k
]):
run_values
[
k
]
=
int
(
l
[
l
.
find
(
":"
)
+
1
:].
split
()[
0
])
break
elif
not
l
.
startswith
(
"# "
):
# we parsed the beginning of the file that could contains these informations,
# no need to parse the whole file
break
return
run_values
...
...
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