Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
0e6abbaa
Commit
0e6abbaa
authored
Jun 10, 2022
by
Hejing Li
Browse files
log_parser.py: change some path
parent
f77cdb01
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
experiments/pyexps/log_parser.py
experiments/pyexps/log_parser.py
+4
-3
No files found.
experiments/pyexps/log_parser.py
View file @
0e6abbaa
...
...
@@ -25,9 +25,10 @@ import os
import
pathlib
import
shutil
import
json
import
re
# How to use
# $ python3 parser.py
../
out/qemu-wire-ib-TCPs-1.json
# $ python3
pyexps/
parser.py out/qemu-wire-ib-TCPs-1.json
#
log_file
=
sys
.
argv
[
1
]
...
...
@@ -36,10 +37,10 @@ log = open(log_file, 'r')
curdir
=
pathlib
.
Path
().
absolute
()
exp_log
=
json
.
load
(
log
)
run_num
=
re
.
split
(
'-|\.'
,
log_file
)[
-
2
]
#Name, starting & ending time
exp_name
=
exp_log
[
'exp_name'
]
tooutdir
=
f
'
../
out/
{
exp_name
}
'
tooutdir
=
f
'out/
{
exp_name
}
/
{
run_num
}
'
outdir
=
os
.
path
.
join
(
curdir
,
tooutdir
)
if
not
os
.
path
.
exists
(
outdir
):
...
...
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