Package com.ardor3d.util.stat

Examples of com.ardor3d.util.stat.StatValue


        // - 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);
View Full Code Here

TOP

Related Classes of com.ardor3d.util.stat.StatValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.