| 1 | package DBIx::Fast::Profile::Base; | ||||||||||
| 2 | |||||||||||
| 3 | 3 | ▶ | use v5.38; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use Object::Pad 0.807; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 3 | our $VERSION = '0.22'; | |||||||||
| 7 | 3 | ▶ | use Carp qw(croak); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 3 | ▶ | use Scalar::Util qw(weaken); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 3 | ▶ | use DBIx::Fast::Output; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | class DBIx::Fast::Profile::Base :does(DBIx::Fast::Output) { | ||||||||||
| 12 | 0 | ▶ | field $dbix :param :reader; | ||||||||
|
Subroutine
dbix: not called CC=1 SCAR=2.6
Pod
undocumented
| |||||||||||
| 13 | 0 | field $enabled :param :accessor = 1; | |||||||||
| 14 | 0 | ▶ | field $slow_query :param :accessor = 1.0; | ||||||||
|
Subroutine
enabled: not called CC=2 SCAR=14.0
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 15 | |||||||||||
| 16 | 0 | ▶ | ADJUST { | ||||||||
|
Subroutine
slow_query: not called CC=2 SCAR=13.0
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 17 | croak "Missing required parameter 'dbix'" unless defined $dbix; | ||||||||||
| 18 | weaken($dbix); | ||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | # Envelope identity for DBIx::Fast::Output events. | ||||||||||
| 22 | 0 | ▶ | method _output_meta () { | ||||||||
|
Subroutine
_output_meta: not called CC=1 SCAR=4.6
| |||||||||||
| 23 | 0 | (my $driver = ref $self) =~ s/^.*:://; | |||||||||
| 24 | 0 | return { source => 'profile', driver => $driver }; | |||||||||
| 25 | 3 | } | |||||||||
| 26 | |||||||||||
| 27 | 3 | method add_query { } | |||||||||
| 28 | 0 | ▶ | method init { croak "Not implemented" } | ||||||||
|
Subroutine
init: not called CC=1 SCAR=1.2
Pod
documented
| |||||||||||
| 29 | 0 | ▶ | method get_slow_queries { croak "Not implemented" } | ||||||||
|
Subroutine
get_slow_queries: not called CC=1 SCAR=1.2
Pod
documented
| |||||||||||
| 30 | 0 | ▶ | method get_stats { croak "Not implemented" } | ||||||||
|
Subroutine
get_stats: not called CC=1 SCAR=1.2
Pod
documented
| |||||||||||
| 31 | 0 | ▶ | method print_stats { croak "Not implemented" } | ||||||||
|
Subroutine
print_stats: not called CC=1 SCAR=1.2
Pod
documented
| |||||||||||
| 32 | |||||||||||
| 33 | # Driver-specific diagnostics. Default to no-ops (return undef) so a driver | ||||||||||
| 34 | # with no native equivalent (e.g. SQLite) inherits them without re-stubbing | ||||||||||
| 35 | # each one, and adding a new diagnostic to one driver does not make the | ||||||||||
| 36 | # others croak. ::MariaDB overrides these with real implementations. | ||||||||||
| 37 | 3 | method get_query_profile { } | |||||||||
| 38 | 3 | method explain_query { } | |||||||||
| 39 | 3 | method get_table_stats { } | |||||||||
| 40 | 3 | method get_index_stats { } | |||||||||
| 41 | 3 | method analyze_indexes { } | |||||||||
| 42 | 3 | method print_index_analysis { } | |||||||||
| 43 | 3 | method get_index_metrics { } | |||||||||
| 44 | 3 | method monitor_connections { } | |||||||||
| 45 | 3 | method get_current_connections { } | |||||||||
| 46 | 3 | method get_processes { } | |||||||||
| 47 | 3 | method print_connection_monitor { } | |||||||||
| 48 | 3 | method start_connection_monitor { } | |||||||||
| 49 | } | ||||||||||
| 50 | |||||||||||
| 51 | 3 | 1; | |||||||||
| 52 | |||||||||||
| 53 | __END__ | ||||||||||