java.lang.Object
io.ebean.meta.AbstractMetricVisitor
io.ebean.meta.BasicMetricVisitor
- All Implemented Interfaces:
MetricVisitor,ServerMetrics
A simple MetricVisitor that can collect the desired metrics into lists.
-
Constructor Summary
ConstructorsConstructorDescriptionBasicMetricVisitor(String name, Function<String, String> naming) Construct to reset and collect everything.BasicMetricVisitor(String name, Function<String, String> naming, boolean reset, boolean collectTransactionMetrics, boolean collectQueryMetrics, boolean collectL2Metrics) Construct specifying reset and what to collect. -
Method Summary
Modifier and TypeMethodDescriptionasData()Return the metrics as a list of MetricData.asJson()Return ServerMetricsAsJson to build the metrics as JSON content.Return the Counter metrics.name()Return the name of the database these metrics were obtained for.Return the naming convention that should be applied to the reported metric names.Return the query metrics.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
collectL2Metrics, collectQueryMetrics, collectTransactionMetrics, reset, visitEnd, visitStart
-
Constructor Details
-
BasicMetricVisitor
public BasicMetricVisitor() -
BasicMetricVisitor
Construct to reset and collect everything. -
BasicMetricVisitor
public BasicMetricVisitor(String name, Function<String, String> naming, boolean reset, boolean collectTransactionMetrics, boolean collectQueryMetrics, boolean collectL2Metrics) Construct specifying reset and what to collect.
-
-
Method Details
-
name
Description copied from interface:ServerMetricsReturn the name of the database these metrics were obtained for.- Specified by:
namein interfaceServerMetrics
-
namingConvention
Description copied from interface:MetricVisitorReturn the naming convention that should be applied to the reported metric names.- Specified by:
namingConventionin interfaceMetricVisitor
-
asJson
Description copied from interface:ServerMetricsReturn ServerMetricsAsJson to build the metrics as JSON content.- Specified by:
asJsonin interfaceServerMetrics
-
asData
Description copied from interface:ServerMetricsReturn the metrics as a list of MetricData.- Specified by:
asDatain interfaceServerMetrics
-
timedMetrics
Description copied from interface:ServerMetricsReturn timed metrics for Transactions, labelled SqlQuery, labelled SqlUpdate.- Specified by:
timedMetricsin interfaceServerMetrics
-
queryMetrics
Description copied from interface:ServerMetricsReturn the query metrics.- Specified by:
queryMetricsin interfaceServerMetrics
-
countMetrics
Description copied from interface:ServerMetricsReturn the Counter metrics.- Specified by:
countMetricsin 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
-