Commit | Line | Data |
adb3554a |
1 | package DBICTest::Stats; |
2 | use strict; |
3 | use warnings; |
4 | |
5 | use base qw/DBIx::Class::Storage::Statistics/; |
6 | |
7 | sub txn_begin { |
8 | my $self = shift; |
9 | |
10 | $self->{'TXN_BEGIN'}++; |
11 | return $self->{'TXN_BEGIN'}; |
12 | } |
13 | |
14 | sub txn_rollback { |
15 | my $self = shift; |
16 | |
17 | $self->{'TXN_ROLLBACK'}++; |
18 | return $self->{'TXN_ROLLBACK'}; |
19 | } |
20 | |
21 | sub txn_commit { |
22 | my $self = shift; |
23 | |
24 | $self->{'TXN_COMMIT'}++; |
25 | return $self->{'TXN_COMMIT'}; |
26 | } |
27 | |
28 | sub svp_begin { |
29 | my ($self, $name) = @_; |
30 | |
31 | $self->{'SVP_BEGIN'}++; |
32 | return $self->{'SVP_BEGIN'}; |
33 | } |
34 | |
35 | sub svn_release { |
36 | my ($self, $name) = @_; |
37 | |
38 | $self->{'SVP_RELEASE'}++; |
39 | return $self->{'SVP_RELEASE'}; |
40 | } |
41 | |
42 | sub svp_rollback { |
43 | my ($self, $name) = @_; |
44 | |
45 | $self->{'SVP_ROLLBACK'}++; |
46 | return $self->{'SVP_ROLLBACK'}; |
47 | } |
48 | |
49 | sub query_start { |
50 | my ($self, $string, @bind) = @_; |
51 | |
52 | $self->{'QUERY_START'}++; |
53 | return $self->{'QUERY_START'}; |
54 | } |
55 | |
56 | sub query_end { |
57 | my ($self, $string) = @_; |
58 | |
59 | $self->{'QUERY_END'}++; |
60 | return $self->{'QUERY_START'}; |
61 | } |
62 | |
63 | 1; |