#!perl

our $DATE = '2015-08-19'; # DATE
our $VERSION = '0.02'; # VERSION

use 5.010001;
use strict;
use warnings;

use Benchmark::Command;

Benchmark::Command::run(
    undef,
    {
        'lcpan (subcommand)'   => [{env=>{COMP_LINE=>"CMD st", COMP_POINT=>6}},
                                   qw/lcpan/],
        'lcpan stats (opt)'    => [{env=>{COMP_LINE=>"CMD stats --js", COMP_POINT=>14}},
                                   qw/lcpan/],
        'pause (subcommand)'   => [{env=>{COMP_LINE=>"CMD upl", COMP_POINT=>7}},
                                   qw/pause/],
        'pause-u (subcommand)' => [{env=>{COMP_LINE=>"CMD upl", COMP_POINT=>7}},
                                   qw/pause-unpacked/],
        '_cpanm'               => [{env=>{COMP_LINE=>"CMD --for", COMP_POINT=>9}},
                                   qw/_cpanm/],
        '_youtube-dl'          => [{env=>{COMP_LINE=>"CMD --no-pl", COMP_POINT=>11}},
                                   qw/_youtube-dl/],
        '_hr'                  => [{env=>{COMP_LINE=>"CMD --he", COMP_POINT=>8}},
                                   qw/_hr/],
    },
    {
        # skip_not_found => 1,
        quiet => 1,
    },
);

# ABSTRACT: Benchmark startup time of some shell completers
# PODNAME: bench-startup-completers

__END__

=pod

=encoding UTF-8

=head1 NAME

bench-startup-completers - Benchmark startup time of some shell completers

=head1 VERSION

This document describes version 0.02 of bench-startup-completers (from Perl distribution App-BenchStartupCompleters), released on 2015-08-19.

=head1 SYNOPSIS

 % bench-startup-completers

Sample output:

                                 Rate lcpan stats (opt) pause (subcommand) lcpan (subcommand) pause-u (subcommand)           _hr     _cpanm _youtube-dl
 lcpan stats (opt)    19.747+-0.019/s                --              -0.6%              -2.0%               -15.2%        -32.6%     -53.8%      -70.9%
 pause (subcommand)   19.874+-0.027/s       0.64+-0.17%                 --              -1.4%               -14.7%        -32.2%     -53.5%      -70.7%
 lcpan (subcommand)   20.159+-0.019/s       2.09+-0.14%        1.43+-0.17%                 --               -13.5%        -31.2%     -52.9%      -70.3%
 pause-u (subcommand) 23.297+-0.036/s      17.98+-0.22%       17.22+-0.24%       15.57+-0.21%                   --        -20.5%     -45.5%      -65.6%
 _hr                  29.298+-0.029/s       48.37+-0.2%       47.42+-0.25%        45.33+-0.2%         25.76+-0.23%            --     -31.5%      -56.8%
 _cpanm                   42.8+-1.6/s       116.6+-8.1%          115.2+-8%        112.1+-7.9%           83.6+-6.8%      46+-5.4%         --      -36.9%
 _youtube-dl           67.776+-0.06/s     243.23+-0.44%      241.03+-0.56%      236.21+-0.43%        190.93+-0.52% 131.33+-0.31% 58.5+-5.9%          --
 
 Average times:
   _youtube-dl         :    14.7545ms
   _cpanm              :    23.3645ms
   _hr                 :    34.1320ms
   pause-u (subcommand):    42.9240ms
   lcpan (subcommand)  :    49.6056ms
   pause (subcommand)  :    50.3170ms
   lcpan stats (opt)   :    50.6406ms

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/App-BenchStartupCompleters>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-App-BenchStartupCompleters>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-BenchStartupCompleters>

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
