// - We only care about the most recent stats
synchronized (StatCollector.getHistorical()) {
final MultiStatSample sample = StatCollector.getHistorical().get(StatCollector.getHistorical().size() - 1);
// - go through things we are configured for
for (final StatType type : _config.keySet()) {
StatValue val = sample.getStatValue(type);
if (val == null) {
if (!StatCollector.hasHistoricalStat(type)) {
continue;
} else {
val = new StatValue();
val.incrementIterations();
}
}
LabelEntry entry = _entries.get(type);
// Prepare our entry object as needed.
if (entry == null) {
entry = new LabelEntry(type);
_entries.put(type, entry);
_graphRoot.attachChild(entry.text);
}
entry.visited = true;
// Update text value
final double value = getBooleanConfig(type, ConfigKeys.FrameAverage.name(), false) ? val
.getAverageValue() : val.getAccumulatedValue();
entry.text.setText(getStringConfig(type, ConfigKeys.Name.name(), type.getStatName()) + " "
+ stripVal(value, type));
// Set font scale
final float scale = getFloatConfig(type, ConfigKeys.FontScale.name(), .80f);