/usr/share/doc/libimage-imlib2-perl/examples/benchmark.pl is in libimage-imlib2-perl 2.03-1build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #!/usr/bin/perl
use Benchmark;
use Image::Imlib2;
my $image = Image::Imlib2->new(100, 100);
$image->set_colour(255, 0, 0, 255);
timethese(-5, {
'point' => \&point,
'line' => \&line,
'rect' => \&rectangle,
'rect_f' => \&rectangle_fill,
'ellipse' => \&ellipse,
'ellipse_f' => \&ellipse_f,
});
#$image->save("benchmark.png");
sub point {
$image->draw_point(rand(100), rand(100));
}
sub line {
$image->draw_line(rand(100), rand(100), rand(100), rand(100));
}
sub rectangle {
$image->draw_rectangle(rand(50), rand(50), rand(50), rand(50));
}
sub rectangle_fill {
$image->fill_rectangle(rand(50), rand(50), rand(50), rand(50));
}
sub ellipse {
$image->draw_ellipse(rand(50) + 25, rand(50) + 25, rand(24) + 1, rand(24) + 1);
}
sub ellipse_f {
$image->fill_ellipse(rand(50) + 25, rand(50) + 25, rand(24) + 1, rand(24) + 1);
}
|