Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 30 lines (19 sloc) 0.611 kb
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
=head1 Name

Benchmark.pm6

=head1 Synopsis

    use v6;
    use Benchmark;

    my ($start,$end,$diff,$avg) = timethis(1000, "code");
    my @stats = timethis(1000, sub { #`( code ) });
    say ~@stats;

    my %results = timethese(1000, {
        "foo" => sub { ... },
        "bar" => sub { ... },
    });
    say ~%results;

=head1 Description

A simple benchmarking module with an interface similar to Perl 5's
Benchmark.pm. However, rather than output results to $*OUT, the results
are merely returned so that you can output them however you please.

=head1 Author

Jonathan Scott Duff <duff@pobox.com>

Something went wrong with that request. Please try again.