#!perl

our $DATE = '2015-08-18'; # DATE
our $VERSION = '0.01'; # 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/],
    },
    {
        # 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.01 of bench-startup-completers (from Perl distribution App-BenchStartupCompleters), released on 2015-08-18.

=head1 SYNOPSIS

 % bench-startup-completers

Sample output:

                                 Rate lcpan stats (opt) lcpan (subcommand) pause (subcommand) pause-u (subcommand) _youtube-dl _cpanm
 lcpan stats (opt)     9.673+-0.026/s                --              -2.0%             -25.2%               -35.5%      -58.9% -60.4%
 lcpan (subcommand)    9.872+-0.016/s       2.06+-0.32%                 --             -23.6%               -34.2%      -58.0% -59.6%
 pause (subcommand)      12.93+-0.1/s        33.7+-1.1%           31+-1.1%                 --               -13.8%      -45.0% -47.0%
 pause-u (subcommand)  14.992+-0.03/s      54.99+-0.52%       51.86+-0.39%       15.97+-0.97%                   --      -36.3% -38.6%
 _youtube-dl          23.522+-0.076/s         143.2+-1%      138.27+-0.87%         81.9+-1.6%           56.9+-0.6%          --  -3.7%
 _cpanm               24.415+-0.054/s     152.41+-0.88%      147.32+-0.68%         88.9+-1.6%         62.85+-0.48%  3.8+-0.41%     --
 
 Average times:
   _cpanm              :    40.9584ms
   _youtube-dl         :    42.5134ms
   pause-u (subcommand):    66.7022ms
   pause (subcommand)  :    77.3395ms
   lcpan (subcommand)  :   101.2966ms
   lcpan stats (opt)   :   103.3805ms

=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
