perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/util perl_bloat.pl
Date Tue, 18 Sep 2001 16:16:18 GMT
stas        01/09/18 09:16:18

  Added:       util     perl_bloat.pl
  Log:
  adding a useful utility that reports how much bloat some perl code adds
  
  Revision  Changes    Path
  1.1                  modperl-2.0/util/perl_bloat.pl
  
  Index: perl_bloat.pl
  ===================================================================
  #!/usr/bin/perl -w
  
  use GTop ();
  
  my $gtop = GTop->new;
  my $before = $gtop->proc_mem($$)->size;
  
  for (@ARGV) {
      if (eval "require $_") {
          eval {
              $_->import;
          };
      }
      else {
          eval $_;
          die $@ if $@;
      }
  }
  
  my $after = $gtop->proc_mem($$)->size;
  
  printf "@ARGV added %s\n", GTop::size_string($after - $before);
  
  
  
  
  
  

Mime
View raw message