public class EnhancedStatsCollector extends AbstractStatsCollector
SimpleStatsCollector
this listener is able to detect rendering
errors. Also Identified.getGeneratedId()
is used to map statistics to a
template. On the other hand it's more resource-intensive.Modifier and Type | Class and Description |
---|---|
static class |
EnhancedStatsCollector.ExecutionData |
AbstractStatsCollector.Stats
Modifier and Type | Field and Description |
---|---|
static String |
COMPUTING_CACHE_CONSUMER_ID |
protected ComputingCache<Long,ConcurrentMap<Long,EnhancedStatsCollector.ExecutionData>> |
data |
IS_NOT_ONEOFF_LAMBA_TEMPLATE
configuration
Constructor and Description |
---|
EnhancedStatsCollector() |
EnhancedStatsCollector(Predicate<String> templatePredicate,
TimeUnit timeUnit) |
Modifier and Type | Method and Description |
---|---|
void |
clearData()
Drop all the collected data.
|
Collection<EnhancedStatsCollector.ExecutionData> |
getRawData(Mustache mustache) |
Set<AbstractStatsCollector.Stats> |
getStats() |
AbstractStatsCollector.Stats |
getStats(Mustache mustache) |
protected void |
init()
Can be overridden so that there's no need to call
super.init(Configuration) . |
void |
renderingFinished(MustacheRenderingEvent event)
Rendering of a
Mustache is about to finish. |
void |
renderingStarted(MustacheRenderingEvent event)
Rendering of a
Mustache is about to start. |
convert, getTimeUnit, isApplied
compilationFinished, parsingStarted
checkNotInitialized, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfigurationKeys, init
public static final String COMPUTING_CACHE_CONSUMER_ID
protected ComputingCache<Long,ConcurrentMap<Long,EnhancedStatsCollector.ExecutionData>> data
public void renderingStarted(MustacheRenderingEvent event)
MustacheListener
Mustache
is about to start. Always use
ReleaseCallbackContainer.registerReleaseCallback(ReleaseCallback)
to release all the necessary resources.renderingStarted
in interface MustacheListener
renderingStarted
in class AbstractMustacheListener
public void renderingFinished(MustacheRenderingEvent event)
MustacheListener
Mustache
is about to finish. Always use
ReleaseCallbackContainer.registerReleaseCallback(ReleaseCallback)
to release all the necessary resources.renderingFinished
in interface MustacheListener
renderingFinished
in class AbstractMustacheListener
protected void init()
AbstractConfigurationAware
super.init(Configuration)
.init
in class AbstractConfigurationAware
public AbstractStatsCollector.Stats getStats(Mustache mustache)
mustache
- public Set<AbstractStatsCollector.Stats> getStats()
public Collection<EnhancedStatsCollector.ExecutionData> getRawData(Mustache mustache)
mustache
- public void clearData()
Copyright © 2017. All rights reserved.