Created
May 26, 2010 21:06
-
-
Save preaction/415063 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use lib '/data/WebGUI/lib'; | |
use warnings; | |
use strict; | |
use Time::HiRes qw(usleep); | |
use WebGUI::Session; | |
use WebGUI::Asset; | |
use Devel::Gladiator qw(walk_arena); | |
use Devel::Size qw(size total_size); | |
use Data::Dumper; | |
BEGIN { do '/data/WebGUI/sbin/preload.perl' } | |
my $table = Devel::Gladiator::arena_ref_counts; | |
{ | |
my $session = WebGUI::Session->open('/data/WebGUI', 'core.conf'); | |
open my $handle, '>', '/dev/null'; | |
$session->output->setHandle($handle); | |
my $asset = WebGUI::Asset->newByUrl($session, 'root/random-assets'); | |
$asset->exportAsHtml({userId => 1, depth => 1}); | |
$session->close; | |
close $handle; | |
} | |
my $after = Devel::Gladiator::arena_ref_counts; | |
for my $key ( keys %{$after} ) { | |
if ( $after->{$key} - $table->{$key} ) { | |
printf "%60s %9s\n", $key, $after->{$key} - $table->{$key}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment