~ubuntu-branches/ubuntu/utopic/libmath-geometry-voronoi-perl/utopic-proposed

« back to all changes in this revision

Viewing changes to leak-test.pl

  • Committer: Package Import Robot
  • Author(s): Florian Schlichting
  • Date: 2013-05-23 21:40:53 UTC
  • Revision ID: package-import@ubuntu.com-20130523214053-1reukv29881hn1o4
Tags: upstream-1.3
ImportĀ upstreamĀ versionĀ 1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use strict;
 
2
use warnings;
 
3
use blib;
 
4
use Math::Geometry::Voronoi;
 
5
 
 
6
my $n = shift || 1000;
 
7
 
 
8
my @points;
 
9
for (1 .. $n) {
 
10
    push @points, [ rand(), rand() ];
 
11
}
 
12
 
 
13
$|++;
 
14
while (1) {
 
15
    my $geo    = Math::Geometry::Voronoi->new(points => \@points);
 
16
    my $result = $geo->compute();
 
17
 
 
18
    #use Devel::Size qw(size total_size);
 
19
    #print "OBJ SIZE: " . total_size($geo);
 
20
    #print "RESULT SIZE: " . total_size($result);
 
21
    #print "DATA SIZE: " . total_size(\@points);
 
22
    print ".";    
 
23
}
 
24