Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- {
- use strict;
- my ($cycles, $i, $yespi, $pi) = 0;
- $cycles = 100;
- my ($x, $y, $cdnt) = 0;
- while ($i++ < $cycles) {
- $x = rand;
- $y = rand;
- $cdnt = $x**2 + $y**2;
- if ($cdnt <= 1) {
- ++$yespi;
- }
- }
- $pi = ($yespi / $cycles) * 4;
- }
- my $after = Devel::Gladiator::arena_ref_counts;
- for my $key ( keys %{$after} ) {
- if ( $table->{$key} && $after->{$key} - $table->{$key} ) {
- printf "%60s %9s\n", $key, $after->{$key} - $table->{$key};
- }
- }
Add Comment
Please, Sign In to add comment