- return f"Min/Avg/Max, " \
- f"{in_list_1[0]}/{in_list_1[1]}/{in_list_1[2]}, " \
- f"{in_list_2[0]}/{in_list_2[1]}/{in_list_2[2]} uSec."
+ hdr_lat_1 = u""
+ if len(in_list_1) == 4:
+ in_list_1[3] += u"=" * (len(in_list_1[3]) % 4)
+ try:
+ hdr_lat_1 = hdrh.histogram.HdrHistogram.decode(in_list_1[3])
+ except hdrh.codec.HdrLengthException:
+ pass
+ hdr_lat_2 = u""
+ if len(in_list_2) == 4:
+ 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:
+ pass
+
+ hdr_lat = u"Not Measured."
+ if hdr_lat_1 and hdr_lat_2:
+ hdr_lat = (
+ f"50%/90%/99%/99.9%, "
+ f"{hdr_lat_1.get_value_at_percentile(50.0)}/"
+ f"{hdr_lat_1.get_value_at_percentile(90.0)}/"
+ f"{hdr_lat_1.get_value_at_percentile(99.0)}/"
+ f"{hdr_lat_1.get_value_at_percentile(99.9)}, "
+ f"{hdr_lat_2.get_value_at_percentile(50.0)}/"
+ f"{hdr_lat_2.get_value_at_percentile(90.0)}/"
+ f"{hdr_lat_2.get_value_at_percentile(99.0)}/"
+ f"{hdr_lat_2.get_value_at_percentile(99.9)} "
+ f"uSec."
+ )
+
+ return (
+ f"Min/Avg/Max, "
+ f"{in_list_1[0]}/{in_list_1[1]}/{in_list_1[2]}, "
+ f"{in_list_2[0]}/{in_list_2[1]}/{in_list_2[2]} uSec.",
+ hdr_lat
+ )