[Jifty-commit] r4156 - in jifty/trunk: lib/Jifty/Plugin
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Sep 26 14:57:58 EDT 2007
Author: sartak
Date: Wed Sep 26 14:57:57 2007
New Revision: 4156
Modified:
jifty/trunk/ (props changed)
jifty/trunk/Makefile.PL
jifty/trunk/lib/Jifty/Plugin/LeakTracker.pm
Log:
r42812 at onn: sartak | 2007-09-19 11:02:34 -0400
POD for LeakTracker's subs
Modified: jifty/trunk/Makefile.PL
==============================================================================
--- jifty/trunk/Makefile.PL (original)
+++ jifty/trunk/Makefile.PL Wed Sep 26 14:57:57 2007
@@ -159,6 +159,7 @@
-default => 0,
recommends('Devel::Events' => '0.02'),
recommends('Devel::Events::Handler::ObjectTracker'),
+ recommends('Devel::Events::Generator::Objects'),
recommends('Devel::Size'),
],
);
Modified: jifty/trunk/lib/Jifty/Plugin/LeakTracker.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/LeakTracker.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/LeakTracker.pm Wed Sep 26 14:57:57 2007
@@ -15,6 +15,11 @@
my $empty_array = total_size([]);
+=head2 init
+
+init installs the triggers needed around each HTTP request
+=cut
+
sub init {
my $self = shift;
return if $self->_pre_init;
@@ -28,6 +33,13 @@
);
}
+=head2 before_request
+
+This trigger sets up Devel::Events to instrument bless and free so it can keep
+track of all the objects created and destroyed in this request
+
+=cut
+
sub before_request
{
my $self = shift;
@@ -39,6 +51,14 @@
$self->generator->enable();
}
+=head2 after_request
+
+This extracts all the data gathered by Devel::Events and puts it into the
+global C<@Jifty::Plugin::LeakTracker::requests> so the LeakTracker dispatcher
+and views can query it to make nice reports
+
+=cut
+
sub after_request
{
my $self = shift;
More information about the Jifty-commit
mailing list