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
Hide 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 {
...
@@ -86,10 +86,10 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
}
if
(
lowerPercentile
>
0
&&
upperPercentile
>
0
)
{
if
(
lowerPercentile
>
0
&&
upperPercentile
>
0
)
{
Metric
percUpperM
=
MetricAnalyzer
.
getMetric
(
"P"
Metric
percUpperM
=
MetricAnalyzer
.
getMetric
(
+
upperPercentile
+
"_"
+
metric
.
getName
());
"P"
+
upperPercentile
+
"_"
+
metric
.
getName
());
Metric
percLowerM
=
MetricAnalyzer
.
getMetric
(
"P"
Metric
percLowerM
=
MetricAnalyzer
.
getMetric
(
+
lowerPercentile
+
"_"
+
metric
.
getName
());
"P"
+
lowerPercentile
+
"_"
+
metric
.
getName
());
if
(
percLowerM
!=
null
&&
percLowerM
.
isOverallMetric
()
if
(
percLowerM
!=
null
&&
percLowerM
.
isOverallMetric
()
&&
percUpperM
!=
null
&&
percUpperM
.
isOverallMetric
())
{
&&
percUpperM
!=
null
&&
percUpperM
.
isOverallMetric
())
{
perc_lower
=
percLowerM
.
getOverallMetric
();
perc_lower
=
percLowerM
.
getOverallMetric
();
...
@@ -108,25 +108,28 @@ public class MetricChartAdapter implements MetricPlotAdapter {
...
@@ -108,25 +108,28 @@ public class MetricChartAdapter implements MetricPlotAdapter {
}
}
if
(
avg
!=
null
)
{
if
(
avg
!=
null
)
{
XYChart
chart
=
view
.
createPlot
(
metric
.
getName
()
+
" -- "
XYChart
chart
=
view
.
createPlot
(
+
metric
.
getDescription
());
metric
.
getName
()
+
" -- "
+
metric
.
getDescription
());
series
=
chart
.
getDataset
().
getSeries
(
0
);
series
=
chart
.
getDataset
().
getSeries
(
0
);
// add, otherwise re-range is not working
series
.
add
(
0
,
0
,
0
,
0
);
if
(
maxItems
>
0
)
{
if
(
maxItems
>
0
)
{
series
.
setMaximumItemCount
(
maxItems
);
series
.
setMaximumItemCount
(
maxItems
);
}
}
if
(
min
!=
null
)
{
if
(
min
!=
null
)
{
chart
.
getDataset
().
addSeries
(
new
YIntervalSeries
(
"Min"
));
chart
.
getDataset
().
addSeries
(
new
YIntervalSeries
(
"Min"
));
minSeries
=
chart
.
getDataset
()
.
getSeries
(
minSeries
=
chart
.
getDataset
()
chart
.
getDataset
().
getSeriesCount
()
-
1
);
.
getSeries
(
chart
.
getDataset
().
getSeriesCount
()
-
1
);
if
(
maxItems
>
0
)
{
if
(
maxItems
>
0
)
{
minSeries
.
setMaximumItemCount
(
maxItems
);
minSeries
.
setMaximumItemCount
(
maxItems
);
}
}
}
}
if
(
max
!=
null
)
{
if
(
max
!=
null
)
{
chart
.
getDataset
().
addSeries
(
new
YIntervalSeries
(
"Max"
));
chart
.
getDataset
().
addSeries
(
new
YIntervalSeries
(
"Max"
));
maxSeries
=
chart
.
getDataset
()
.
getSeries
(
maxSeries
=
chart
.
getDataset
()
chart
.
getDataset
().
getSeriesCount
()
-
1
);
.
getSeries
(
chart
.
getDataset
().
getSeriesCount
()
-
1
);
if
(
maxItems
>
0
)
{
if
(
maxItems
>
0
)
{
maxSeries
.
setMaximumItemCount
(
maxItems
);
maxSeries
.
setMaximumItemCount
(
maxItems
);
}
}
...
@@ -159,8 +162,9 @@ public class MetricChartAdapter implements MetricPlotAdapter {
...
@@ -159,8 +162,9 @@ public class MetricChartAdapter implements MetricPlotAdapter {
varDown
=
0
;
varDown
=
0
;
}
}
}
}
series
.
add
(
seconds
,
avgVal
,
Math
.
max
(
0
,
avgVal
-
varDown
),
avgVal
if
(
avg
.
isValid
())
+
varUp
);
series
.
add
(
seconds
,
avgVal
,
Math
.
max
(
0
,
avgVal
-
varDown
),
avgVal
+
varUp
);
}
}
if
(
minSeries
!=
null
)
{
if
(
minSeries
!=
null
)
{
double
minV
=
scaledValue
(
min
);
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