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
520e22f2
Verified
Commit
520e22f2
authored
Sep 25, 2021
by
Sebastian Endres
Browse files
Fix broken plots for plot_all (fuckup with sides)
parent
c0f8f34a
Changes
2
Hide whitespace changes
Inline
Side-by-side
plot_all.py
View file @
520e22f2
...
...
@@ -9,7 +9,7 @@ from typing import Literal, Optional, Union
from
termcolor
import
colored
,
cprint
from
enums
import
CacheMode
,
PlotMode
from
enums
import
CacheMode
,
PlotMode
,
Side
from
plot_diagram
import
DEFAULT_TITLES
,
PlotCli
from
result_parser
import
ExtendedMeasurementResult
,
Result
from
tracer
import
ParsingError
...
...
@@ -18,11 +18,6 @@ from utils import TraceTriple, create_relpath, existing_file_path
DEFAULT_TITLE
=
"{mode_default_title} ({test_abbr}, server: {server}, client: {client})"
class
Side
(
Enum
):
LEFT
=
"left"
RIGHT
=
"right"
def
parse_args
():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
...
...
@@ -41,14 +36,6 @@ def parse_args():
action
=
"store_true"
,
help
=
"Plot also failed test cases."
,
)
parser
.
add_argument
(
"--side"
,
action
=
"store"
,
choices
=
Side
,
type
=
Side
,
default
=
Side
.
LEFT
,
help
=
"Select the side of capture (left=client, right=server, default=left)."
,
)
parser
.
add_argument
(
"-t"
,
"--title"
,
...
...
@@ -100,7 +87,6 @@ class PlotAllCli:
self
,
# log_dirs: list[Path],
result_files
:
list
[
Path
],
side
:
Side
,
title
:
str
,
annotate
:
bool
,
format
:
str
,
...
...
@@ -113,7 +99,6 @@ class PlotAllCli:
# self.log_dirs = log_dirs
self
.
result_files
=
result_files
self
.
only_sat
=
only_sat
self
.
side
=
side
self
.
title
=
title
self
.
annotate
=
annotate
self
.
format
=
format
...
...
@@ -153,7 +138,7 @@ class PlotAllCli:
left_pcap_path
=
base_sim_path
/
f
"trace_node_
{
Side
.
LEFT
.
value
}
_with_secrets.pcapng"
,
right_pcap_path
=
base_sim_path
/
f
"trace_node_
{
Side
.
LEF
T
.
value
}
_with_secrets.pcapng"
,
/
f
"trace_node_
{
Side
.
RIGH
T
.
value
}
_with_secrets.pcapng"
,
)
if
not
trace_triple
.
left_pcap_path
.
is_file
():
...
...
@@ -314,7 +299,6 @@ def main():
# log_dirs=args.log_dirs,
result_files
=
args
.
results
,
only_sat
=
args
.
only_sat
,
side
=
args
.
side
,
title
=
args
.
title
,
annotate
=
not
args
.
no_annotation
,
format
=
args
.
format
,
...
...
tracer.py
View file @
520e22f2
...
...
@@ -709,7 +709,9 @@ class Trace:
rtt_ret
=
calc_rtt
(
Direction
.
TO_SERVER
,
left_trace
,
right_trace
)
rtt_fwd
=
calc_rtt
(
Direction
.
TO_CLIENT
,
left_trace
,
right_trace
)
assert
abs
(
rtt_fwd
-
rtt_ret
)
<
0.001
,
"RTTs vary very strongly"
assert
(
abs
(
rtt_fwd
-
rtt_ret
)
<
0.005
),
f
"RTTs vary by more than 5ms:
{
rtt_fwd
*
100
:
.
1
f
}
ms vs.
{
rtt_ret
*
100
:
.
1
f
}
ms"
return
(
rtt_fwd
+
rtt_ret
)
/
2
...
...
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