Skip chart serie if there is no data
@@ -170,21 +170,27 @@ public abstract class ReportDocument extends HtmlDocument {
case MEAN_AND_DEV: {
MeanAndDev meanAndDev = aggregation.totalStats.getRepresentation(target, MeanAndDev.class);
if (meanAndDev == null) return false;
+ if (!Double.isNaN(meanAndDev.mean) && !Double.isNaN(meanAndDev.dev)) {
chart.addValue(toMillis(meanAndDev.mean), toMillis(meanAndDev.dev), categoryName, subCategoryNumeric,
subCategoryValue);
+ }
break;
}
case OPERATION_THROUGHPUT_NET: {
OperationThroughput throughput = aggregation.totalStats.getRepresentation(target, OperationThroughput.class);
if (throughput == null) return false;
+ if (throughput.net > 0) {
chart.addValue(throughput.net, 0, categoryName, subCategoryNumeric, subCategoryValue);
+ }
break;
}
case DATA_THROUGHPUT: {
DataThroughput dataThroughput = aggregation.totalStats.getRepresentation(target, DataThroughput.class);
if (dataThroughput == null) return false;
+ if (dataThroughput.meanThroughput > 0) {
chart.addValue(dataThroughput.meanThroughput / (1024.0 * 1024.0), dataThroughput.deviation
/ (1024.0 * 1024.0), categoryName, subCategoryNumeric, subCategoryValue);
+ }
break;
}
case MEAN_AND_DEV_SERIES: {
@@ -192,9 +198,11 @@ public abstract class ReportDocument extends HtmlDocument {
if (series == null) return false;
int sample = 0;
for (MeanAndDev meanAndDev : series.samples) {
+ if (meanAndDev.mean > 0) {
chart.addValue(toMillis(meanAndDev.mean), toMillis(meanAndDev.dev), seriesCategoryName, sample++,
String.valueOf(TimeUnit.MILLISECONDS.toSeconds(sample * series.period)));
}
+ }
break;
}
case REQUESTS_SERIES: {
@@ -202,9 +210,11 @@ public abstract class ReportDocument extends HtmlDocument {
if (series == null) return false;
int sample = 0;
for (DefaultOutcome defaultOutcome : series.samples) {
+ if (defaultOutcome.requests > 0) {
chart.addValue(defaultOutcome.requests, 0, seriesCategoryName, sample++,
String.valueOf(TimeUnit.MILLISECONDS.toSeconds(sample * series.period)));
}
+ }
break;
}
case OPERATION_THROUGHPUT_GROSS_SERIES: {
@@ -212,9 +222,11 @@ public abstract class ReportDocument extends HtmlDocument {
if (series == null) return false;
int sample = 0;
for (OperationThroughput defaultOutcome : series.samples) {
+ if (defaultOutcome.gross > 0) {
chart.addValue(defaultOutcome.gross, 0, seriesCategoryName, sample++,
String.valueOf(TimeUnit.MILLISECONDS.toSeconds(sample * series.period)));
}
+ }
break;
}
case OPERATION_THROUGHPUT_NET_SERIES: {
@@ -222,9 +234,11 @@ public abstract class ReportDocument extends HtmlDocument {
if (series == null) return false;
int sample = 0;
for (OperationThroughput defaultOutcome : series.samples) {
+ if (defaultOutcome.net > 0) {
chart.addValue(defaultOutcome.net, 0, seriesCategoryName, sample++,
String.valueOf(TimeUnit.MILLISECONDS.toSeconds(sample * series.period)));
}
+ }
break;
}
}
