Package io.ebean.meta
Class BasicMetricVisitor
java.lang.Object
io.ebean.meta.AbstractMetricVisitor
io.ebean.meta.BasicMetricVisitor
- All Implemented Interfaces:
MetricVisitor,ServerMetrics
public class BasicMetricVisitor extends AbstractMetricVisitor implements ServerMetrics
A simple MetricVisitor that can collect the desired metrics into lists.
-
Constructor Summary
Constructors Constructor Description BasicMetricVisitor()Construct to reset and collect everything.BasicMetricVisitor(boolean reset, boolean collectTransactionMetrics, boolean collectQueryMetrics, boolean collectL2Metrics)Construct specifying reset and what to collect. -
Method Summary
Modifier and Type Method Description List<MetaCountMetric>getCountMetrics()Return the Counter metrics.List<MetaQueryMetric>getQueryMetrics()Return the query metrics.List<MetaTimedMetric>getTimedMetrics()Return timed metrics for Transactions, labelled SqlQuery, labelled SqlUpdate.voidvisitCount(MetaCountMetric metric)Visit a Counter metric.voidvisitQuery(MetaQueryMetric metric)Visit DTO and SQL query metrics.voidvisitTimed(MetaTimedMetric metric)Visit transaction metrics (and L2 cache metrics in future).Methods inherited from class io.ebean.meta.AbstractMetricVisitor
isCollectL2Metrics, isCollectQueryMetrics, isCollectTransactionMetrics, isReset, visitEnd, visitStart
-
Constructor Details
-
BasicMetricVisitor
public BasicMetricVisitor()Construct to reset and collect everything. -
BasicMetricVisitor
public BasicMetricVisitor(boolean reset, boolean collectTransactionMetrics, boolean collectQueryMetrics, boolean collectL2Metrics)Construct specifying reset and what to collect.
-
-
Method Details
-
getTimedMetrics
Description copied from interface:ServerMetricsReturn timed metrics for Transactions, labelled SqlQuery, labelled SqlUpdate.- Specified by:
getTimedMetricsin interfaceServerMetrics
-
getQueryMetrics
Description copied from interface:ServerMetricsReturn the query metrics.- Specified by:
getQueryMetricsin interfaceServerMetrics
-
getCountMetrics
Description copied from interface:ServerMetricsReturn the Counter metrics.- Specified by:
getCountMetricsin interfaceServerMetrics
-
visitTimed
Description copied from interface:MetricVisitorVisit transaction metrics (and L2 cache metrics in future).- Specified by:
visitTimedin interfaceMetricVisitor
-
visitQuery
Description copied from interface:MetricVisitorVisit DTO and SQL query metrics.- Specified by:
visitQueryin interfaceMetricVisitor
-
visitCount
Description copied from interface:MetricVisitorVisit a Counter metric.- Specified by:
visitCountin interfaceMetricVisitor
-