Skip to content

Instantly share code, notes, and snippets.

@preaction
Created May 26, 2010 21:06
Show Gist options
  • Save preaction/415063 to your computer and use it in GitHub Desktop.
Save preaction/415063 to your computer and use it in GitHub Desktop.
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