[Bast-commits] r4090 -
DBIx-Class/0.09/branches/savepoints/t/lib/DBICTest
gphat at dev.catalyst.perl.org
gphat at dev.catalyst.perl.org
Wed Feb 20 12:15:42 GMT 2008
Author: gphat
Date: 2008-02-20 12:15:42 +0000 (Wed, 20 Feb 2008)
New Revision: 4090
Added:
DBIx-Class/0.09/branches/savepoints/t/lib/DBICTest/Stats.pm
Log:
Add Stats class for tracking savepoint calls
Added: DBIx-Class/0.09/branches/savepoints/t/lib/DBICTest/Stats.pm
===================================================================
--- DBIx-Class/0.09/branches/savepoints/t/lib/DBICTest/Stats.pm (rev 0)
+++ DBIx-Class/0.09/branches/savepoints/t/lib/DBICTest/Stats.pm 2008-02-20 12:15:42 UTC (rev 4090)
@@ -0,0 +1,63 @@
+package DBICTest::Stats;
+use strict;
+use warnings;
+
+use base qw/DBIx::Class::Storage::Statistics/;
+
+sub txn_begin {
+ my $self = shift;
+
+ $self->{'TXN_BEGIN'}++;
+ return $self->{'TXN_BEGIN'};
+}
+
+sub txn_rollback {
+ my $self = shift;
+
+ $self->{'TXN_ROLLBACK'}++;
+ return $self->{'TXN_ROLLBACK'};
+}
+
+sub txn_commit {
+ my $self = shift;
+
+ $self->{'TXN_COMMIT'}++;
+ return $self->{'TXN_COMMIT'};
+}
+
+sub svp_begin {
+ my ($self, $name) = @_;
+
+ $self->{'SVP_BEGIN'}++;
+ return $self->{'SVP_BEGIN'};
+}
+
+sub svn_release {
+ my ($self, $name) = @_;
+
+ $self->{'SVP_RELEASE'}++;
+ return $self->{'SVP_RELEASE'};
+}
+
+sub svp_rollback {
+ my ($self, $name) = @_;
+
+ $self->{'SVP_ROLLBACK'}++;
+ return $self->{'SVP_ROLLBACK'};
+}
+
+sub query_start {
+ my ($self, $string, @bind) = @_;
+
+ $self->{'QUERY_START'}++;
+ return $self->{'QUERY_START'};
+}
+
+sub query_end {
+ my ($self, $string) = @_;
+
+ $self->{'QUERY_END'}++;
+ return $self->{'QUERY_START'};
+}
+
+1;
More information about the Bast-commits
mailing list