The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Class::ReluctantORM::Monitor::QuerySize - Running total of data size

SYNOPSIS

  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();

DESCRIPTION

Keeps a running total of the number of bytes returned in all rows of the query.

This is a Measuring Monitor.