#!perl

our $DATE = '2015-08-02'; # DATE
our $VERSION = '0.01'; # VERSION

use 5.010001;
use strict;
use warnings;

use Benchmark::Dumb qw(timethese);

timethese(
    100,
    {
        'env [200,"OK","foo"]' => sub { [200, "OK", "foo"] },
        'env [200,"OK","foo",{}]' => sub { [200, "OK", "foo", {}] },
        'naked "foo"' => sub { "foo" },
        'list "foo"' => sub { (200, "OK", "foo") },
    },
);


# ABSTRACT: Compare returning enveloped response compared to naked/list
# PODNAME: bench-envres

__END__

=pod

=encoding UTF-8

=head1 NAME

bench-envres - Compare returning enveloped response compared to naked/list

=head1 VERSION

This document describes version 0.01 of bench-envres (from Perl distribution App-BenchPerinci), released on 2015-08-02.

=head1 SYNOPSIS

 % bench-envres

Sample output:

 Benchmark: ran env [200,"OK","foo",{}], env [200,"OK","foo"], list "foo", naked "foo".
 env [200,"OK","foo",{}]: 4.50515e-07 +- 9.6e-11 wallclock secs (0.0213%) @ (2.21968e+06 +-    470)/s (n=115)
    env [200,"OK","foo"]: 3.13932e-07 +- 9.6e-11 wallclock secs (0.0306%) @ (3.18541e+06 +-    970)/s (n=115)
              list "foo": 7.0078e-08 +- 3.9e-11 wallclock secs (0.0557%) @ (1.42699e+07 +-   8000)/s (n=100)
             naked "foo": 4.65e-09 +- 1.0e-10 wallclock secs (2.2%) @ (2.152e+08 +- 4.7e+06)/s (n=100)

=head1 SEE ALSO

=head1 HOMEPAGE

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

=head1 SOURCE

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

=head1 BUGS

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

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
