Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CSIT-1133: Cosmetic improvements in trending plots
[csit.git]
/
resources
/
tools
/
presentation
/
new
/
generator_CPTA.py
diff --git
a/resources/tools/presentation/new/generator_CPTA.py
b/resources/tools/presentation/new/generator_CPTA.py
index
4dc5e6f
..
d4ac06d
100644
(file)
--- a/
resources/tools/presentation/new/generator_CPTA.py
+++ b/
resources/tools/presentation/new/generator_CPTA.py
@@
-136,9
+136,8
@@
def _generate_trending_traces(in_data, job_name, build_info,
anomalies_colors = list()
anomalies_avgs = list()
anomaly_color = {
anomalies_colors = list()
anomalies_avgs = list()
anomaly_color = {
- "outlier": 0.0,
- "regression": 0.33,
- "normal": 0.66,
+ "regression": 0.0,
+ "normal": 0.5,
"progression": 1.0
}
if anomaly_classification:
"progression": 1.0
}
if anomaly_classification:
@@
-150,7
+149,7
@@
def _generate_trending_traces(in_data, job_name, build_info,
anomalies_colors.append(
anomaly_color[anomaly_classification[idx]])
anomalies_avgs.append(avgs[idx])
anomalies_colors.append(
anomaly_color[anomaly_classification[idx]])
anomalies_avgs.append(avgs[idx])
- anomalies_colors.extend([0.0, 0.
33, 0.66
, 1.0])
+ anomalies_colors.extend([0.0, 0.
5
, 1.0])
# Create traces
# Create traces
@@
-161,8
+160,9
@@
def _generate_trending_traces(in_data, job_name, build_info,
line={
"width": 1
},
line={
"width": 1
},
+ showlegend=True,
legendgroup=name,
legendgroup=name,
- name="{name}
-thput
".format(name=name),
+ name="{name}".format(name=name),
marker={
"size": 5,
"color": color,
marker={
"size": 5,
"color": color,
@@
-183,6
+183,7
@@
def _generate_trending_traces(in_data, job_name, build_info,
"width": 1,
"color": color,
},
"width": 1,
"color": color,
},
+ showlegend=False,
legendgroup=name,
name='{name}-trend'.format(name=name)
)
legendgroup=name,
name='{name}-trend'.format(name=name)
)
@@
-193,20
+194,18
@@
def _generate_trending_traces(in_data, job_name, build_info,
y=anomalies_avgs,
mode='markers',
hoverinfo="none",
y=anomalies_avgs,
mode='markers',
hoverinfo="none",
- showlegend=
Tru
e,
+ showlegend=
Fals
e,
legendgroup=name,
name="{name}-anomalies".format(name=name),
marker={
"size": 15,
"symbol": "circle-open",
"color": anomalies_colors,
legendgroup=name,
name="{name}-anomalies".format(name=name),
marker={
"size": 15,
"symbol": "circle-open",
"color": anomalies_colors,
- "colorscale": [[0.00, "grey"],
- [0.25, "grey"],
- [0.25, "red"],
- [0.50, "red"],
- [0.50, "white"],
- [0.75, "white"],
- [0.75, "green"],
+ "colorscale": [[0.00, "red"],
+ [0.33, "red"],
+ [0.33, "white"],
+ [0.66, "white"],
+ [0.66, "green"],
[1.00, "green"]],
"showscale": True,
"line": {
[1.00, "green"]],
"showscale": True,
"line": {
@@
-221,8
+220,8
@@
def _generate_trending_traces(in_data, job_name, build_info,
"size": 14
},
"tickmode": 'array',
"size": 14
},
"tickmode": 'array',
- "tickvals": [0.1
25, 0.375, 0.625, 0.875
],
- "ticktext": ["
Outlier", "
Regression", "Normal", "Progression"],
+ "tickvals": [0.1
67, 0.500, 0.833
],
+ "ticktext": ["Regression", "Normal", "Progression"],
"ticks": "",
"ticklen": 0,
"tickangle": -90,
"ticks": "",
"ticklen": 0,
"tickangle": -90,