REGEX_NIC = re.compile(r'(\d*ge\dp\d\D*\d*[a-z]*)-')
+# This value depends on latency stream rate (9001 pps) and duration (5s).
+PERCENTILE_MAX = 99.9995
+
def generate_plots(spec, data):
"""Generate all plots specified in the specification file.
for item in decoded.get_recorded_iterator():
percentile = item.percentile_level_iterated_to
- if percentile > 99.9999999:
- continue
xaxis.append(previous_x)
yaxis.append(item.value_iterated_to)
hovertext.append(
continue
for item in decoded.get_recorded_iterator():
+ # The real value is "percentile".
+ # For 100%, we cut that down to "x_perc" to avoid infinity.
percentile = item.percentile_level_iterated_to
- if percentile > 99.9999999:
- continue
+ x_perc = min(percentile, PERCENTILE_MAX)
xaxis.append(previous_x)
yaxis.append(item.value_iterated_to)
hovertext.append(
f"Percentile: {prev_perc:.5f}-{percentile:.5f}%<br>"
f"Latency: {item.value_iterated_to}uSec"
)
- next_x = 100.0 / (100.0 - percentile)
+ next_x = 100.0 / (100.0 - x_perc)
xaxis.append(next_x)
yaxis.append(item.value_iterated_to)
hovertext.append(