aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/dash/app/pal/data/data.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2022-04-25 16:55:01 +0200
committerTibor Frank <tifrank@cisco.com>2022-04-26 08:49:11 +0000
commitc01befc28450d5c2003d25876dda0201eb827735 (patch)
tree4bd0eacbe76c605b8950e7b001ef296bbeca277a /resources/tools/dash/app/pal/data/data.py
parent76def9e0a3404b38c9e7fbd58260700207b17639 (diff)
feat(uti): Add statistics
Change-Id: I14046fd1050f130d201bbe81a72e48ad4fd10057 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/dash/app/pal/data/data.py')
-rw-r--r--resources/tools/dash/app/pal/data/data.py30
1 files changed, 23 insertions, 7 deletions
diff --git a/resources/tools/dash/app/pal/data/data.py b/resources/tools/dash/app/pal/data/data.py
index a3b6c2a478..3d9b8b1664 100644
--- a/resources/tools/dash/app/pal/data/data.py
+++ b/resources/tools/dash/app/pal/data/data.py
@@ -151,13 +151,29 @@ class Data:
def read_stats(self, days=None):
"""Read Suite Result Analysis data partition from parquet.
"""
- lambda_f = lambda part: True if part["stats_type"] == "sra" else False
-
- return self._create_dataframe_from_parquet(
- path=self._get_path("statistics"),
- partition_filter=lambda_f,
- columns=None, # Get all columns.
- days=days
+ l_stats = lambda part: True if part["stats_type"] == "sra" else False
+ l_mrr = lambda part: True if part["test_type"] == "mrr" else False
+ l_ndrpdr = lambda part: True if part["test_type"] == "ndrpdr" else False
+
+ return (
+ self._create_dataframe_from_parquet(
+ path=self._get_path("statistics"),
+ partition_filter=l_stats,
+ columns=self._get_columns("statistics"),
+ days=days
+ ),
+ self._create_dataframe_from_parquet(
+ path=self._get_path("statistics-trending"),
+ partition_filter=l_mrr,
+ columns=self._get_columns("statistics-trending"),
+ days=days
+ ),
+ self._create_dataframe_from_parquet(
+ path=self._get_path("statistics-trending"),
+ partition_filter=l_ndrpdr,
+ columns=self._get_columns("statistics-trending"),
+ days=days
+ )
)
def read_trending_mrr(self, days=None):