load-all   [plain text]


use strict;

use blib;
use lib './lib';

use Devel::Size;
use Storable;
use DateTime::TimeZone;
use Number::Format ();

print "started\n";

{my $x = <STDIN>;}

print $ENV{PERL_DATETIME_TIMEZONE_PP} ? "Pure Perl" : "XS";
print "\n";
print "loading all zones ...\n";
my @z;
my $total = 0;
for my $z ( DateTime::TimeZone::all_names )
{
    push @z, DateTime::TimeZone->new( name => $z );
    my $size = Devel::Size::total_size($z[-1]);
    $size += Devel::Size::total_size( $z[-1]->_spans ) if $z[-1]->can('_spans');
    print "Size for $z:$size\n";

    $total += $size;
}

print scalar @z . " zones loaded\n";

print "Total size: ", Number::Format::format_number( $total, 0, 0 ), "\n";

{my $x = <STDIN>;}