aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_CPTA.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2018-04-16 09:44:50 +0200
committerTibor Frank <tifrank@cisco.com>2018-04-16 07:45:34 +0000
commit9821b058c2f4901a9b4d66667018da214513ab28 (patch)
tree5a42c97c688c4c849cd741450bd1220a66598f44 /resources/tools/presentation/generator_CPTA.py
parent2553b94d96db0a23b1fa3bfa6a3dae1468f4cb83 (diff)
CSIT-1041: Trending dashboard
Change-Id: Ic706612218e0ac6b991a15abc4d67e16905e8087 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_CPTA.py')
-rw-r--r--resources/tools/presentation/generator_CPTA.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py
index 54679a26f6..3a8ea93e0a 100644
--- a/resources/tools/presentation/generator_CPTA.py
+++ b/resources/tools/presentation/generator_CPTA.py
@@ -232,14 +232,14 @@ def _generate_trending_traces(in_data, build_info, period, moving_win_size=10,
in_data = _select_data(in_data, period,
fill_missing=fill_missing,
use_first=use_first)
- try:
- data_x = ["{0}/{1}".format(key, build_info[str(key)][1].split("~")[-1])
- for key in in_data.keys()]
- except KeyError:
- data_x = [key for key in in_data.keys()]
- # hover_text = ["vpp-build: {0}".format(x[1].split("~")[-1])
- # for x in build_info.values()]
- # data_x = [key for key in in_data.keys()]
+ # try:
+ # data_x = ["{0}/{1}".format(key, build_info[str(key)][1].split("~")[-1])
+ # for key in in_data.keys()]
+ # except KeyError:
+ # data_x = [key for key in in_data.keys()]
+ hover_text = ["vpp-build: {0}".format(x[1].split("~")[-1])
+ for x in build_info.values()]
+ data_x = [key for key in in_data.keys()]
data_y = [val for val in in_data.values()]
data_pd = pd.Series(data_y, index=data_x)
@@ -251,12 +251,12 @@ def _generate_trending_traces(in_data, build_info, period, moving_win_size=10,
anomalies = pd.Series()
anomalies_res = list()
for idx, item in enumerate(in_data.items()):
- item_pd = pd.Series([item[1], ],
- index=["{0}/{1}".
- format(item[0],
- build_info[str(item[0])][1].split("~")[-1]),
- ])
- #item_pd = pd.Series([item[1], ], index=[item[0], ])
+ # item_pd = pd.Series([item[1], ],
+ # index=["{0}/{1}".
+ # format(item[0],
+ # build_info[str(item[0])][1].split("~")[-1]),
+ # ])
+ item_pd = pd.Series([item[1], ], index=[item[0], ])
if item[0] in outliers.keys():
anomalies = anomalies.append(item_pd)
anomalies_res.append(0.0)
@@ -288,8 +288,8 @@ def _generate_trending_traces(in_data, build_info, period, moving_win_size=10,
"color": color,
"symbol": "circle",
},
- # text=hover_text,
- # hoverinfo="x+y+text+name"
+ text=hover_text,
+ hoverinfo="x+y+text+name"
)
traces = [trace_samples, ]