Skip to content

Commit

Permalink
Memory leak test script
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrundman committed Jun 4, 2010
1 parent 8bdb3c7 commit 7d54fd5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tools/leak.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/perl

use lib qw(blib/lib blib/arch);
use MP3::Cut::Gapless;
use Time::HiRes qw(sleep);

my $file = shift;
my $n = 0;

for ( 1..50000 ) {
my $cut = MP3::Cut::Gapless->new(
file => $file,
start_ms => 1000,
end_ms => 2000,
);

while ( $cut->read( my $buf, 4096 ) ) { }

sleep 0.001;
}

0 comments on commit 7d54fd5

Please sign in to comment.