Signed-off-by: Tibor Frank <tifrank@cisco.com>
Change-Id: I92ed4ebc1aa6e7b7731035fb923d6138c3c3def2
show_tput = True
if ttype == "pdr":
show_tput = True
if ttype == "pdr":
- y_lat_row = itm_data[C.VALUE_ITER["pdr-lat"]].to_list()
+ y_lat_row = itm_data[C.VALUE_ITER["latency"]].to_list()
y_lat = [(y / norm_factor) for y in y_lat_row]
if y_lat:
try:
y_lat = [(y / norm_factor) for y in y_lat_row]
if y_lat:
try:
return list(), list()
x_axis = df["start_time"].tolist()
return list(), list()
x_axis = df["start_time"].tolist()
y_data = [(v / norm_factor) for v in df[C.VALUE[ttype]].tolist()]
else:
y_data = [(v * norm_factor) for v in df[C.VALUE[ttype]].tolist()]
y_data = [(v / norm_factor) for v in df[C.VALUE[ttype]].tolist()]
else:
y_data = [(v * norm_factor) for v in df[C.VALUE[ttype]].tolist()]
else:
add_info = str()
hover_itm = hover_itm.replace(
else:
add_info = str()
hover_itm = hover_itm.replace(
- "<prop>", "latency" if ttype == "pdr-lat" else "average"
+ "<prop>", "latency" if ttype == "latency" else "average"
).replace("<stdev>", stdev).replace("<additional-info>", add_info)
hover.append(hover_itm)
).replace("<stdev>", stdev).replace("<additional-info>", add_info)
hover.append(hover_itm)
customdata_samples.append(_get_hdrh_latencies(row, name))
customdata.append({"name": name})
else:
customdata_samples.append(_get_hdrh_latencies(row, name))
customdata.append({"name": name})
else:
f"csit-ref: {row['job']}/{row['build']}<br>"
f"hosts: {', '.join(row['hosts'])}"
)
f"csit-ref: {row['job']}/{row['build']}<br>"
f"hosts: {', '.join(row['hosts'])}"
)
hover_itm = hover_itm.replace("[pps]", "[us]")
hover_trend.append(hover_itm)
hover_itm = hover_itm.replace("[pps]", "[us]")
hover_trend.append(hover_itm)
f"trend [pps]: {trend_avg[idx]:,.0f}<br>"
f"classification: {anomaly}"
)
f"trend [pps]: {trend_avg[idx]:,.0f}<br>"
f"classification: {anomaly}"
)
hover_itm = hover_itm.replace("[pps]", "[us]")
hover.append(hover_itm)
anomaly_color.extend([0.0, 0.5, 1.0])
hover_itm = hover_itm.replace("[pps]", "[us]")
hover.append(hover_itm)
anomaly_color.extend([0.0, 0.5, 1.0])
"symbol": "circle-open",
"color": anomaly_color,
"colorscale": C.COLORSCALE_LAT \
"symbol": "circle-open",
"color": anomaly_color,
"colorscale": C.COLORSCALE_LAT \
- if ttype == "pdr-lat" else C.COLORSCALE_TPUT,
+ if ttype == "latency" else C.COLORSCALE_TPUT,
"showscale": True,
"line": {
"width": 2
"showscale": True,
"line": {
"width": 2
"tickmode": "array",
"tickvals": [0.167, 0.500, 0.833],
"ticktext": C.TICK_TEXT_LAT \
"tickmode": "array",
"tickvals": [0.167, 0.500, 0.833],
"ticktext": C.TICK_TEXT_LAT \
- if ttype == "pdr-lat" else C.TICK_TEXT_TPUT,
+ if ttype == "latency" else C.TICK_TEXT_TPUT,
"ticks": "",
"ticklen": 0,
"tickangle": -90,
"ticks": "",
"ticklen": 0,
"tickangle": -90,
if itm["testtype"] == "pdr":
traces, _ = _generate_trending_traces(
if itm["testtype"] == "pdr":
traces, _ = _generate_trending_traces(
itm["id"],
df,
get_color(idx),
itm["id"],
df,
get_color(idx),
# Maximal value of TIME_PERIOD for data read from the parquets in days.
# Do not change without a good reason.
# Maximal value of TIME_PERIOD for data read from the parquets in days.
# Do not change without a good reason.
+ MAX_TIME_PERIOD = 20 # 130
# It defines the time period for data read from the parquets in days from
# now back to the past.
# It defines the time period for data read from the parquets in days from
# now back to the past.
"mrr": "result_receive_rate_rate_avg",
"ndr": "result_ndr_lower_rate_value",
"pdr": "result_pdr_lower_rate_value",
"mrr": "result_receive_rate_rate_avg",
"ndr": "result_ndr_lower_rate_value",
"pdr": "result_pdr_lower_rate_value",
- "pdr-lat": "result_latency_forward_pdr_50_avg",
+ "latency": "result_latency_forward_pdr_50_avg",
"hoststack-cps": "result_rate_value",
"hoststack-rps": "result_rate_value",
"hoststack-bps": "result_bandwidth_value",
"hoststack-cps": "result_rate_value",
"hoststack-rps": "result_rate_value",
"hoststack-bps": "result_bandwidth_value",
- "hoststack-lat": "result_latency_value"
+ "hoststack-latency": "result_latency_value"
}
VALUE_ITER = {
"mrr": "result_receive_rate_rate_values",
"ndr": "result_ndr_lower_rate_value",
"pdr": "result_pdr_lower_rate_value",
}
VALUE_ITER = {
"mrr": "result_receive_rate_rate_values",
"ndr": "result_ndr_lower_rate_value",
"pdr": "result_pdr_lower_rate_value",
- "pdr-lat": "result_latency_forward_pdr_50_avg",
"latency": "result_latency_forward_pdr_50_avg",
"hoststack-cps": "result_rate_value",
"hoststack-rps": "result_rate_value",
"hoststack-bps": "result_bandwidth_value",
"latency": "result_latency_forward_pdr_50_avg",
"hoststack-cps": "result_rate_value",
"hoststack-rps": "result_rate_value",
"hoststack-bps": "result_bandwidth_value",
- "hoststack-lat": "result_latency_value",
"hoststack-latency": "result_latency_value"
}
"hoststack-latency": "result_latency_value"
}
"mrr": "result_receive_rate_rate_unit",
"ndr": "result_ndr_lower_rate_unit",
"pdr": "result_pdr_lower_rate_unit",
"mrr": "result_receive_rate_rate_unit",
"ndr": "result_ndr_lower_rate_unit",
"pdr": "result_pdr_lower_rate_unit",
- "pdr-lat": "result_latency_forward_pdr_50_unit",
"latency": "result_latency_forward_pdr_50_unit",
"hoststack-cps": "result_rate_unit",
"hoststack-rps": "result_rate_unit",
"hoststack-bps": "result_bandwidth_unit",
"latency": "result_latency_forward_pdr_50_unit",
"hoststack-cps": "result_rate_unit",
"hoststack-rps": "result_rate_unit",
"hoststack-bps": "result_bandwidth_unit",
- "hoststack-lat": "result_latency_unit",
"hoststack-latency": "result_latency_unit"
}
"hoststack-latency": "result_latency_unit"
}