Class::ReluctantORM::Monitor::QuerySize - Running total of data size
use aliased 'Class::ReluctantORM::Monitor::QuerySize'; my $mon = QuerySize->new(highwater_count => N, fatal_threshold => X); Class::ReluctantORM->install_global_monitor($mon); Pirate->install_class_monitor($mon); # Do a query.... Pirate->fetch(...); # Read from the monitor my $bytes = $mon->last_measured_value(); # Reset counter to 0 if desired - the counter gets reset at # the beginning of every query anyway, but you might have need # to reset it in a fetchrow callback $mon->reset();
Keeps a running total of the number of bytes returned in all rows of the query.
This is a Measuring Monitor.
To install Class::ReluctantORM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::ReluctantORM
CPAN shell
perl -MCPAN -e shell install Class::ReluctantORM
For more information on module installation, please visit the detailed CPAN module installation guide.