aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-05-07 16:25:42 +0200
committerTibor Frank <tifrank@cisco.com>2019-05-07 18:04:06 +0000
commitccabf7938cdaea9e50a7d808fa3ea76b29d6a091 (patch)
tree20333fa4f5744b3aee8e6bfd409db4d408dacc95 /resources/tools
parent8939cbac9c5ec3a58a827dd7f364b965a8bb9d3c (diff)
Report: NFV Graphs
Change-Id: I5fd192c2e010226a3e081b3c4e66265dd9654740 Signed-off-by: Tibor Frank <tifrank@cisco.com> (cherry picked from commit 6fb043d8e4450d7db31a5f5903e84f600aa807a4)
Diffstat (limited to 'resources/tools')
-rw-r--r--resources/tools/presentation/generator_plots.py58
1 files changed, 33 insertions, 25 deletions
diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py
index 5f2de94872..0e237e50aa 100644
--- a/resources/tools/presentation/generator_plots.py
+++ b/resources/tools/presentation/generator_plots.py
@@ -1529,45 +1529,53 @@ def plot_service_density_heatmap_compare(plot, input_data):
)
try:
- data_point = str(data_r[c][n])
+ point_r = str(data_r[c][n])
+ point_text_r = text_r.format(
+ val_r=point_r,
+ stdev_r=vals[txt_chains[c]][txt_nodes[n]]["stdev_r"],
+ nr_r=vals[txt_chains[c]][txt_nodes[n]]["nr_r"])
except KeyError:
- data_point = None
- point["text"] = "" if data_point is None else data_point
+ point_r = None
+ point_text_r = "Not present"
+ point["text"] = "" if point_r is None else point_r
annotations_r.append(deepcopy(point))
try:
- data_point = str(data_c[c][n])
+ point_c = str(data_c[c][n])
+ point_text_c = text_c.format(
+ val_c=point_c,
+ stdev_c=vals[txt_chains[c]][txt_nodes[n]]["stdev_c"],
+ nr_c=vals[txt_chains[c]][txt_nodes[n]]["nr_c"])
except KeyError:
- data_point = None
- point["text"] = "" if data_point is None else data_point
+ point_c = None
+ point_text_c = "Not present"
+ point["text"] = "" if point_c is None else point_c
annotations_c.append(deepcopy(point))
try:
- data_point = str(diff[c][n])
+ point_d = str(diff[c][n])
+ point_text_diff = text_diff.format(
+ title_r=plot["reference"]["name"],
+ title_c=plot["compare"]["name"],
+ diff=point_d)
except KeyError:
- data_point = None
- point["text"] = "" if data_point is None else data_point
+ point_d = None
+ point_text_diff = ""
+ point["text"] = "" if point_d is None else point_d
annotations_diff.append(deepcopy(point))
+ try:
+ name = vals[txt_chains[c]][txt_nodes[n]]["name"]
+ except KeyError:
+ continue
+
hover_line.append(text.format(
- name=vals[txt_chains[c]][txt_nodes[n]]["name"],
+ name=name,
title_r=plot["reference"]["name"],
- text_r=text_r.format(
- val_r=data_r[c][n],
- stdev_r=vals[txt_chains[c]][txt_nodes[n]]["stdev_r"],
- nr_r=vals[txt_chains[c]][txt_nodes[n]]["nr_r"]
- ) if data_r[c][n] is not None else "Test Failed",
+ text_r=point_text_r,
title_c=plot["compare"]["name"],
- text_c=text_c.format(
- val_c=data_c[c][n],
- stdev_c=vals[txt_chains[c]][txt_nodes[n]]["stdev_c"],
- nr_c=vals[txt_chains[c]][txt_nodes[n]]["nr_c"]
- ) if data_c[c][n] is not None else "Test Failed",
- text_diff=text_diff.format(
- title_r=plot["reference"]["name"],
- title_c=plot["compare"]["name"],
- diff=diff[c][n]
- ) if diff[c][n] is not None else ""
+ text_c=point_text_c,
+ text_diff=point_text_diff
))
hovertext.append(hover_line)