public class SimpleStatsCollector extends AbstractStatsCollector
MustacheListener collecting template rendering statistics.
Note that the template is identified with the name/id - so data will not be
correct if there's more than one templates with the same name (which is
possible if using MustacheEngine.compileMustache(String, String)).
This listener is not able to detect rendering errors.| Modifier and Type | Class and Description |
|---|---|
class |
SimpleStatsCollector.SimpleStats |
AbstractStatsCollector.Stats| Modifier and Type | Field and Description |
|---|---|
static String |
COMPUTING_CACHE_CONSUMER_ID |
protected ComputingCache<String,ComputingCache<Long,AtomicLong>> |
data
Map of name to map of time to amount
|
IS_NOT_ONEOFF_LAMBA_TEMPLATEconfiguration| Constructor and Description |
|---|
SimpleStatsCollector() |
SimpleStatsCollector(Predicate<String> templatePredicate,
TimeUnit timeUnit) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearData()
Drop all the collected data.
|
Map<String,Map<Long,Long>> |
getData() |
Map<Long,Long> |
getData(String templateId) |
Set<SimpleStatsCollector.SimpleStats> |
getSimpleStats() |
SimpleStatsCollector.SimpleStats |
getSimpleStats(String templateId) |
void |
init()
Can be overridden so that there's no need to call
super.init(Configuration). |
void |
renderingStarted(MustacheRenderingEvent event)
Rendering of a
Mustache is about to start. |
convert, getTimeUnit, isAppliedcompilationFinished, parsingStarted, renderingFinishedcheckNotInitialized, initclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfigurationKeys, initpublic static final String COMPUTING_CACHE_CONSUMER_ID
protected ComputingCache<String,ComputingCache<Long,AtomicLong>> data
public void init()
AbstractConfigurationAwaresuper.init(Configuration).init in class AbstractConfigurationAwarepublic void renderingStarted(MustacheRenderingEvent event)
MustacheListenerMustache is about to start. Always use
ReleaseCallbackContainer.registerReleaseCallback(ReleaseCallback)
to release all the necessary resources.renderingStarted in interface MustacheListenerrenderingStarted in class AbstractMustacheListenerpublic void clearData()
public Map<Long,Long> getData(String templateId)
templateId - public SimpleStatsCollector.SimpleStats getSimpleStats(String templateId)
templateId - public Set<SimpleStatsCollector.SimpleStats> getSimpleStats()
Copyright © 2020. All rights reserved.