Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
ce548198
Commit
ce548198
authored
Apr 24, 2017
by
Simon Luser
Browse files
fixed metric visualization - only drawn if isValid()
parent
d670b1de
Changes
1
Show whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/views/visualization/ui/MetricChartAdapter.java
View file @
ce548198
...
...
@@ -86,10 +86,10 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
if
(
lowerPercentile
>
0
&&
upperPercentile
>
0
)
{
Metric
percUpperM
=
MetricAnalyzer
.
getMetric
(
"P"
+
upperPercentile
+
"_"
+
metric
.
getName
());
Metric
percLowerM
=
MetricAnalyzer
.
getMetric
(
"P"
+
lowerPercentile
+
"_"
+
metric
.
getName
());
Metric
percUpperM
=
MetricAnalyzer
.
getMetric
(
"P"
+
upperPercentile
+
"_"
+
metric
.
getName
());
Metric
percLowerM
=
MetricAnalyzer
.
getMetric
(
"P"
+
lowerPercentile
+
"_"
+
metric
.
getName
());
if
(
percLowerM
!=
null
&&
percLowerM
.
isOverallMetric
()
&&
percUpperM
!=
null
&&
percUpperM
.
isOverallMetric
())
{
perc_lower
=
percLowerM
.
getOverallMetric
();
...
...
@@ -108,25 +108,28 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
if
(
avg
!=
null
)
{
XYChart
chart
=
view
.
createPlot
(
metric
.
getName
()
+
" -- "
+
metric
.
getDescription
());
XYChart
chart
=
view
.
createPlot
(
metric
.
getName
()
+
" -- "
+
metric
.
getDescription
());
series
=
chart
.
getDataset
().
getSeries
(
0
);
// add, otherwise re-range is not working
series
.
add
(
0
,
0
,
0
,
0
);
if
(
maxItems
>
0
)
{
series
.
setMaximumItemCount
(
maxItems
);
}
if
(
min
!=
null
)
{
chart
.
getDataset
().
addSeries
(
new
YIntervalSeries
(
"Min"
));
minSeries
=
chart
.
getDataset
()
.
getSeries
(
chart
.
getDataset
().
getSeriesCount
()
-
1
);
minSeries
=
chart
.
getDataset
()
.
getSeries
(
chart
.
getDataset
().
getSeriesCount
()
-
1
);
if
(
maxItems
>
0
)
{
minSeries
.
setMaximumItemCount
(
maxItems
);
}
}
if
(
max
!=
null
)
{
chart
.
getDataset
().
addSeries
(
new
YIntervalSeries
(
"Max"
));
maxSeries
=
chart
.
getDataset
()
.
getSeries
(
chart
.
getDataset
().
getSeriesCount
()
-
1
);
maxSeries
=
chart
.
getDataset
()
.
getSeries
(
chart
.
getDataset
().
getSeriesCount
()
-
1
);
if
(
maxItems
>
0
)
{
maxSeries
.
setMaximumItemCount
(
maxItems
);
}
...
...
@@ -159,8 +162,9 @@ public class MetricChartAdapter implements MetricPlotAdapter {
varDown
=
0
;
}
}
series
.
add
(
seconds
,
avgVal
,
Math
.
max
(
0
,
avgVal
-
varDown
),
avgVal
+
varUp
);
if
(
avg
.
isValid
())
series
.
add
(
seconds
,
avgVal
,
Math
.
max
(
0
,
avgVal
-
varDown
),
avgVal
+
varUp
);
}
if
(
minSeries
!=
null
)
{
double
minV
=
scaledValue
(
min
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment