Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sedrubal
Masterarbeit
evaluation_tools
Commits
733689b9
Verified
Commit
733689b9
authored
Sep 27, 2021
by
Sebastian Endres
Browse files
Fix scripts for UrlOrPath
parent
cad73a37
Changes
4
Hide whitespace changes
Inline
Side-by-side
collect_plots.py
View file @
733689b9
...
...
@@ -65,7 +65,8 @@ def collect_plots(
for
meas
in
result
.
get_all_measuements_of_type
(
"SAT"
,
succeeding
=
True
):
files
=
[
meas
.
log_dir_for_test
/
f
"time_
{
mode
.
value
}
_plot.png"
for
mode
in
plot_modes
meas
.
log_dir_for_test
.
path
/
f
"time_
{
mode
.
value
}
_plot.png"
for
mode
in
plot_modes
]
for
png
in
files
:
...
...
plot_all.py
View file @
733689b9
...
...
@@ -115,13 +115,13 @@ class PlotAllCli:
)
->
list
[
str
]:
"""Generate plot for for this test case."""
assert
self
.
_current_log_dir
test_case_dir
=
measurement_result
.
log_dir_for_test
test_case_dir
=
measurement_result
.
log_dir_for_test
.
path
if
not
measurement_result
.
succeeded
and
not
self
.
include_failed
:
cprint
(
(
"✔ Measurement "
f
"
{
measurement_result
.
log_dir_for_test
.
relative_to
(
self
.
_current_log_dir
)
}
"
f
"
{
measurement_result
.
log_dir_for_test
.
path
.
relative_to
(
self
.
_current_log_dir
)
}
"
"Failed. Skipping. Use --include-failed to include it anyway."
),
file
=
sys
.
stderr
,
...
...
@@ -272,7 +272,7 @@ class PlotAllCli:
attrs
=
[
"bold"
],
)
self
.
_current_log_dir
=
result
.
log_dir
self
.
_current_log_dir
=
result
.
log_dir
.
path
plot_results
=
defaultdict
[
str
,
set
[
str
]](
set
[
str
])
...
...
post_process_logs.py
View file @
733689b9
...
...
@@ -281,7 +281,7 @@ class PostProcessor:
if
test_result
.
result
==
"unsupported"
:
continue
self
.
post_process_test_repetition_run_dir
(
test_result
.
log_dir_for_test
)
self
.
post_process_test_repetition_run_dir
(
test_result
.
log_dir_for_test
.
path
)
for
meas_result
in
result
.
all_measurement_results
:
if
meas_result
.
result
==
"unsupported"
:
...
...
utils.py
View file @
733689b9
...
...
@@ -320,37 +320,46 @@ class UrlOrPath:
@
property
def
parent
(
self
)
->
"UrlOrPath"
:
return
UrlOrPath
(
Url
(
scheme
=
self
.
scheme
,
auth
=
self
.
auth
,
host
=
self
.
host
,
port
=
self
.
port
,
path
=
str
(
self
.
path
.
parent
),
if
isinstance
(
self
.
src
,
Path
):
return
UrlOrPath
(
self
.
path
.
parent
)
else
:
return
UrlOrPath
(
Url
(
scheme
=
self
.
scheme
,
auth
=
self
.
auth
,
host
=
self
.
host
,
port
=
self
.
port
,
path
=
str
(
self
.
path
.
parent
),
)
)
)
def
__truediv__
(
self
,
other
:
Union
[
str
,
Path
])
->
"UrlOrPath"
:
return
UrlOrPath
(
Url
(
scheme
=
self
.
scheme
,
auth
=
self
.
auth
,
host
=
self
.
host
,
port
=
self
.
port
,
path
=
str
(
self
.
path
/
other
),
if
isinstance
(
self
.
src
,
Path
):
return
UrlOrPath
(
self
.
path
/
other
)
else
:
return
UrlOrPath
(
Url
(
scheme
=
self
.
scheme
,
auth
=
self
.
auth
,
host
=
self
.
host
,
port
=
self
.
port
,
path
=
str
(
self
.
path
/
other
),
)
)
)
def
__rtruediv__
(
self
,
other
:
Union
[
str
,
Path
])
->
"UrlOrPath"
:
return
UrlOrPath
(
Url
(
scheme
=
self
.
scheme
,
auth
=
self
.
auth
,
host
=
self
.
host
,
port
=
self
.
port
,
path
=
str
(
other
/
self
.
path
),
if
isinstance
(
self
.
src
,
Path
):
return
UrlOrPath
(
Path
(
other
)
/
self
.
path
)
else
:
return
UrlOrPath
(
Url
(
scheme
=
self
.
scheme
,
auth
=
self
.
auth
,
host
=
self
.
host
,
port
=
self
.
port
,
path
=
str
(
other
/
self
.
path
),
)
)
)
def
is_dir
(
self
)
->
bool
:
return
self
.
path
.
is_dir
()
...
...
Write
Preview
Supports
Markdown
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