-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
When executing the CLI with more then one run, if a single latency_point in the latency_points list is None, then when the last run is reached, an error is thrown:
> tcp_latency example.does.not.exist
tcp-latency example.does.not.exist
example.does.not.exist: tcp seq=0 port=443 timeout=5 failed
example.does.not.exist: tcp seq=1 port=443 timeout=5 failed
example.does.not.exist: tcp seq=2 port=443 timeout=5 failed
example.does.not.exist: tcp seq=3 port=443 timeout=5 failed
example.does.not.exist: tcp seq=4 port=443 timeout=5 failed
--- example.does.not.exist tcp-latency statistics ---
5 packets transmitted
Traceback (most recent call last):
File "tcp_latency/tcp_latency.py", line 154, in <module>
_main()
File "tcp_latency/tcp_latency.py", line 143, in _main
measure_latency(
File "tcp_latency/tcp_latency.py", line 91, in measure_latency
f'rtt min/avg/max = {min(latency_points)}/{mean(latency_points)}/{max(latency_points)} ms', # noqa: E501
TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'None of the three methods - min, mean, or max - are able to accept iterables that contain None.
The behavior is the same when just one of the points are None and the rest are valid floatss.
Due to another issue, the last
latency_pointis not included in RTT calculations, therefore if only the last point that isNone, this error is not thrown.
Metadata
Metadata
Assignees
Labels
No labels