public StyleResolvingEvaluator getInstance() { final StyleResolvingEvaluator expression = (StyleResolvingEvaluator) super.getInstance(); expression.statisticsHit = new DoubleKeyedCounter<String, Long>(); expression.statisticsMiss = new DoubleKeyedCounter<String, Long>(); return expression; } }
protected void reportCachePerformance() { super.reportCachePerformance(); if ( collectDetailedStatistics ) { logger.debug( statisticsHit.printStatistic() + "\n" + statisticsMiss.printStatistic() ); } }
protected void recordCacheMiss( final ReportElement e ) { super.recordCacheMiss( e ); if ( collectDetailedStatistics ) { statisticsMiss.increaseCounter( e.getElementType().getMetaData().getName(), e.getChangeTracker() ); } }
protected void recordCacheHit( final ReportElement e ) { super.recordCacheHit( e ); if ( collectDetailedStatistics ) { statisticsHit.increaseCounter( e.getElementType().getMetaData().getName(), e.getChangeTracker() ); } }
public SimpleStyleResolver( final boolean designTime ) { this.designTime = designTime; usageCounter = new SingleKeyedCounter<String>(); extendedCounter = new DoubleKeyedCounter<String, Long>(); }
public String toString() { final StringBuilder b = new StringBuilder(); b.append( usageCounter.printStatistic() ); b.append( extendedCounter.printStatistic() ); return b.toString(); }
public StyleResolvingEvaluator() { statisticsHit = new DoubleKeyedCounter<String, Long>(); statisticsMiss = new DoubleKeyedCounter<String, Long>(); ExtendedConfiguration config = ClassicEngineBoot.getInstance().getExtendedConfig(); collectDetailedStatistics = config.getBoolProperty( DETAILED_STATISTICS_CONFIG ); }