NAME

DBIx::Fast::Profile::Base - Abstract base class for database driver profiles

DESCRIPTION

Defines the interface that all driver-specific profile classes must implement. Subclasses (e.g. DBIx::Fast::Profile::MariaDB, DBIx::Fast::Profile::SQLite) override these methods to provide driver-native profiling and diagnostics.

METHODS

init

Initializes profiling for the specific database driver. Must be implemented by subclasses.

add_query

Hook called when a query is executed. The base implementation is a no-op; subclasses may override to record driver-level metrics.

get_slow_queries

Returns slow queries using driver-native facilities. Must be implemented by subclasses.

get_stats

Returns driver-specific query and server statistics. Must be implemented by subclasses.

Prints a formatted report of driver-specific statistics. Must be implemented by subclasses.

Driver diagnostics interface

The following methods form the driver diagnostics API. They default to no-ops (return undef) here, so a driver with no native equivalent inherits them unchanged, and are overridden by DBIx::Fast::Profile::MariaDB with full implementations. DBIx::Fast::Profile::SQLite inherits the no-op defaults:

get_query_profile, explain_query, get_table_stats, get_index_stats, analyze_indexes, print_index_analysis, get_index_metrics, monitor_connections, get_current_connections, get_processes, print_connection_monitor, start_connection_monitor.

AUTHOR

SeHarrys

LICENSE

This is free software under the Artistic License 2.0.