aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/input_data_parser.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2021-11-12 13:15:10 +0100
committerTibor Frank <tifrank@cisco.com>2021-11-12 12:21:17 +0000
commit7b3cf8085cb05c8a327cecf6fd4cfb83430ee5e3 (patch)
tree564249d20df5c41adadfdf3c17356254212e7d86 /resources/tools/presentation/input_data_parser.py
parente21ca2707937c91f66af9c3309a426aa61be7502 (diff)
Report: Show min/avg/max latency for aws
Change-Id: I4acbe6b20054881f95bf4bab03958ad2dab60629 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/input_data_parser.py')
-rw-r--r--resources/tools/presentation/input_data_parser.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py
index 8747f938a9..461d7b423d 100644
--- a/resources/tools/presentation/input_data_parser.py
+++ b/resources/tools/presentation/input_data_parser.py
@@ -477,7 +477,8 @@ class ExecutionChecker(ResultVisitor):
return u"Test Failed."
def _process_lat(in_str_1, in_str_2):
- """Extract min, avg, max values from latency string.
+ """Extract P50, P90 and P99 latencies or min, avg, max values from
+ latency string.
:param in_str_1: Latency string for one direction produced by robot
framework.
@@ -498,13 +499,13 @@ class ExecutionChecker(ResultVisitor):
try:
hdr_lat_1 = hdrh.histogram.HdrHistogram.decode(in_list_1[3])
except hdrh.codec.HdrLengthException:
- return None
+ hdr_lat_1 = None
in_list_2[3] += u"=" * (len(in_list_2[3]) % 4)
try:
hdr_lat_2 = hdrh.histogram.HdrHistogram.decode(in_list_2[3])
except hdrh.codec.HdrLengthException:
- return None
+ hdr_lat_2 = None
if hdr_lat_1 and hdr_lat_2:
hdr_lat = (
@@ -515,9 +516,17 @@ class ExecutionChecker(ResultVisitor):
hdr_lat_2.get_value_at_percentile(90.0),
hdr_lat_2.get_value_at_percentile(99.0)
)
-
if all(hdr_lat):
return hdr_lat
+ else:
+ hdr_lat = (
+ in_list_1[0], in_list_1[1], in_list_1[2],
+ in_list_2[0], in_list_2[1], in_list_2[2]
+ )
+ for item in hdr_lat:
+ if item in (u"-1", u"4294967295", u"0"):
+ return None
+ return hdr_lat
return None