aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app/cdash/utils/telemetry_data.py
diff options
context:
space:
mode:
Diffstat (limited to 'csit.infra.dash/app/cdash/utils/telemetry_data.py')
-rw-r--r--csit.infra.dash/app/cdash/utils/telemetry_data.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/csit.infra.dash/app/cdash/utils/telemetry_data.py b/csit.infra.dash/app/cdash/utils/telemetry_data.py
index 9975874d96..c63ee0057a 100644
--- a/csit.infra.dash/app/cdash/utils/telemetry_data.py
+++ b/csit.infra.dash/app/cdash/utils/telemetry_data.py
@@ -64,7 +64,7 @@ class TelemetryData:
df = pd.concat(lst_items, ignore_index=True, copy=False)
# Use only neccessary data:
- df = df[[
+ df = df[df.columns.intersection([
"job",
"build",
"dut_type",
@@ -81,7 +81,8 @@ class TelemetryData:
"result_ndr_lower_rate_value",
"result_ndr_lower_rate_unit",
"telemetry"
- ]]
+ ])]
+
# Transform metrics from strings to dataframes:
lst_telemetry = list()
for _, row in df.iterrows():
@@ -91,7 +92,7 @@ class TelemetryData:
"value": list(),
"timestamp": list()
}
-
+
# If there is no telemetry data, use empty dictionary
if row["telemetry"] is None or isinstance(row["telemetry"], float):
lst_telemetry.append(pd.DataFrame(data=d_telemetry))