// Note: this may or may not be a good measure, but it at least helps to mark some bad data as such
return average-standardDeviation > 0.75 * average;
}
private void exportMemorySummary(PrintWriter out, GCModel model) {
FormattedValue formed = footprintFormatter.formatToFormatted(model.getFootprint());
exportValue(out, "footprint", formed.getValue(), formed.getUnits());
// check whether we have full gc data at all
final boolean fullGCDataVailable = model.getFootprintAfterFullGC().getN() != 0;
final boolean fullGCSlopeDataVailable = model.getFootprintAfterFullGC().getN() > 1;
if (!fullGCDataVailable) {
exportValue(out, "footprintAfterFullGC", "n.a.", "M");
exportValue(out, "slopeAfterFullGC", "n.a.", "M/s");
exportValue(out, "freedMemoryByFullGC", "n.a.", "M");
exportValue(out, "avgFreedMemoryByFullGC", "n.a.", "M");
exportValue(out, "avgFreedMemoryByFullGC\u03c3", "n.a.", "M");
exportValue(out, "avgFreedMemoryByFullGCisSig", "n.a.", "bool");
}
else {
formed = footprintFormatter.formatToFormatted(model.getFootprintAfterFullGC().average());
exportValue(out, "avgfootprintAfterFullGC", formed.getValue(), formed.getUnits());
formed = sigmaMemoryFormat(model.getFootprintAfterFullGC().standardDeviation());
exportValue(out, "avgfootprintAfterFullGC\u03c3", formed.getValue(), formed.getUnits());
exportValue(out, "avgfootprintAfterFullGCisSig", isSignificant(model.getFootprintAfterFullGC().average(),
model.getFootprintAfterFullGC().standardDeviation()));
formed = footprintFormatter.formatToFormatted(model.getFreedMemoryByFullGC().getSum());
exportValue(out, "freedMemoryByFullGC", formed.getValue(), formed.getUnits());
exportValue(out, "freedMemoryByFullGCpc", percentFormatter.format(model.getFreedMemoryByFullGC().getSum()*100.0/model.getFreedMemory()), "%");
formed = footprintFormatter.formatToFormatted(model.getFreedMemoryByFullGC().average());
exportValue(out, "avgFreedMemoryByFullGC", formed.getValue(), formed.getUnits() + "/coll");
formed = sigmaMemoryFormat(model.getFreedMemoryByFullGC().standardDeviation());
exportValue(out, "avgFreedMemoryByFullGC\u03c3", formed.getValue(), formed.getUnits() + "/coll");
exportValue(out, "avgFreedMemoryByFullGCisSig", isSignificant(model.getFreedMemoryByFullGC().average(),
model.getFreedMemoryByFullGC().standardDeviation()));
if (fullGCSlopeDataVailable) {
formed = footprintSlopeFormatter.formatToFormatted(model.getPostFullGCSlope().slope());
exportValue(out, "slopeAfterFullGC", formed.getValue(), formed.getUnits() + "/s");
formed = footprintSlopeFormatter.formatToFormatted(model.getRelativePostFullGCIncrease().slope());
exportValue(out, "avgRelativePostFullGCInc", formed.getValue(), formed.getUnits() + "/coll");
}
else {
exportValue(out, "slopeAfterFullGC", "n.a.", "M/s");
exportValue(out, "avgRelativePostFullGCInc", "n.a.", "M/coll");
}
}
// check whether we have gc data at all (or only full gc)
final boolean gcDataAvailable = model.getFootprintAfterGC().getN() != 0;
if (!gcDataAvailable) {
exportValue(out, "footprintAfterGC", "n.a.", "M");
exportValue(out, "slopeAfterGC", "n.a.", "M/s");
exportValue(out, "freedMemoryByGC", "n.a.", "M");
exportValue(out, "avgFreedMemoryByGC", "n.a.", "M/coll");
exportValue(out, "avgRelativePostGCInc", "n.a.", "M/coll");
}
else {
formed = footprintFormatter.formatToFormatted(model.getFootprintAfterGC().average());
exportValue(out, "avgfootprintAfterGC", formed.getValue(), formed.getUnits());
formed = sigmaMemoryFormat(model.getFootprintAfterGC().standardDeviation());
exportValue(out, "avgfootprintAfterGC\u03c3", formed.getValue(), formed.getUnits());
exportValue(out, "avgfootprintAfterGCisSig", isSignificant(model.getFootprintAfterGC().average(),
model.getFootprintAfterGC().standardDeviation()));
if (fullGCDataVailable && model.getRelativePostGCIncrease().getN() != 0) {
formed = footprintSlopeFormatter.formatToFormatted(model.getPostGCSlope());
exportValue(out, "slopeAfterGC", formed.getValue(), formed.getUnits() + "/s");
formed = footprintSlopeFormatter.formatToFormatted(model.getRelativePostGCIncrease().average());
exportValue(out, "avgRelativePostGCInc", formed.getValue(), formed.getUnits() + "/coll");
}
else {
exportValue(out, "slopeAfterGC", "n.a.", "M/s");
exportValue(out, "avgRelativePostGCInc", "n.a.", "M/coll");
}
formed = footprintFormatter.formatToFormatted(model.getFreedMemoryByGC().getSum());
exportValue(out, "freedMemoryByGC", formed.getValue(), formed.getUnits());
exportValue(out, "freedMemoryByGCpc", percentFormatter.format(model.getFreedMemoryByGC().getSum()*100.0/model.getFreedMemory()), "%");
formed = footprintFormatter.formatToFormatted(model.getFreedMemoryByGC().average());
exportValue(out, "avgFreedMemoryByGC", formed.getValue(), formed.getUnits() + "/coll");
formed = sigmaMemoryFormat(model.getFreedMemoryByGC().standardDeviation());
exportValue(out, "avgFreedMemoryByGC\u03c3", formed.getValue(), formed.getUnits() + "/coll");
exportValue(out, "avgFreedMemoryByGCisSig", isSignificant(model.getFreedMemoryByGC().average(),
model.getFreedMemoryByGC().standardDeviation()));
}
formed = footprintFormatter.formatToFormatted(model.getFreedMemory());
exportValue(out, "freedMemory", formed.getValue(), formed.getUnits());
}