001package io.ebean.meta;
002
003import java.util.List;
004
005/**
006 * Provides access to the meta data in EbeanServer such as query execution statistics.
007 */
008public interface MetaInfoManager {
009
010  /**
011   * Collect query plans.
012   */
013  List<MetaQueryPlan> collectQueryPlans(QueryPlanRequest request);
014
015  /**
016   * Visit the metrics resetting and collecting/reporting as desired.
017   */
018  void visitMetrics(MetricVisitor visitor);
019
020  /**
021   * Run a visit collecting all the metrics and returning BasicMetricVisitor
022   * which holds all the metrics in simple lists.
023   */
024  BasicMetricVisitor visitBasic();
025
026  /**
027   * Just reset all the metrics. Maybe only useful for testing purposes.
028   */
029  void resetAllMetrics();
030
031  /**
032   * Collect and return the ObjectGraphNode statistics.
033   * <p>
034   * These show query executions based on an origin point and relative path.
035   * This is used to look at the amount of lazy loading occurring for a given
036   * query origin point and highlight potential for tuning a query.
037   * </p>
038   *
039   * @param reset Set to true to reset the underlying statistics after collection.
040   */
041  List<MetaOrmQueryNode> collectNodeStatistics(boolean reset);
042
043}