Bencher-Scenarios-DateTime-Format-ISO8601-Format

 view release on metacpan or  search on metacpan

lib/Bencher/Scenario/DateTime/Format/ISO8601/Format/Formatting.pm  view on Meta::CPAN

=head1 VERSION

This document describes version 0.002 of Bencher::Scenario::DateTime::Format::ISO8601::Format::Formatting (from Perl distribution Bencher-Scenarios-DateTime-Format-ISO8601-Format), released on 2023-01-19.

=head1 SYNOPSIS

To run benchmark with default option:

 % bencher -m DateTime::Format::ISO8601::Format::Formatting

To run module startup overhead benchmark:

 % bencher --module-startup -m DateTime::Format::ISO8601::Format::Formatting

For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see L<bencher> or run C<bencher --help>.

=head1 DESCRIPTION

Packaging a benchmark script as a Bencher scenario makes it convenient to include/exclude/add participants/datasets (either via CLI or Perl code), send the result to a central repository, among others . See L<Bencher> and L<bencher> (CLI) for more de...

=head1 BENCHMARKED MODULES

Version numbers shown below are the versions used when running the sample benchmark.

L<DateTime::Format::ISO8601::Format> 0.005

=head1 BENCHMARK PARTICIPANTS

=over

=item * format_date (perl_code) [format_date]

Function call template:

 DateTime::Format::ISO8601::Format->new->format_date(<dt>)



=item * format_time (perl_code) [format_time]

Function call template:

 DateTime::Format::ISO8601::Format->new->format_time(<dt>)



=item * format_datetime (perl_code) [format_datetime]

Function call template:

 DateTime::Format::ISO8601::Format->new->format_datetime(<dt>)



=back

=head1 BENCHMARK DATASETS

=over

=item * do{my$var=[bless({formatter=>undef,local_c=>{day=>31,day_of_quarter=>92,day_of_week=>7,day_of_year=>366,hour=>12,minute=>34,month=>12,quarter=>4,second=>56,year=>2000},local_rd_days=>730485,local_rd_secs=>45296,locale=>bless({am_pm_abbreviate...

=back

=head1 SAMPLE BENCHMARK RESULTS

Run on: perl: I<< v5.34.0 >>, CPU: I<< Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (2 cores) >>, OS: I<< GNU/Linux Ubuntu version 20.04 >>, OS kernel: I<< Linux version 5.4.0-91-generic >>.

Benchmark with default options (C<< bencher -m DateTime::Format::ISO8601::Format::Formatting >>):

 #table1#
 +-----------------+-----------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | participant     | p_tags          | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples |
 +-----------------+-----------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
 | format_datetime | format_datetime |     20000 |        49 |                 0.00% |                 7.48% | 1.2e-07 |      20 |
 | format_time     | format_time     |     21000 |        47 |                 5.90% |                 1.50% | 1.1e-07 |      20 |
 | format_date     | format_date     |     22000 |        46 |                 7.48% |                 0.00% |   1e-07 |      22 |
 +-----------------+-----------------+-----------+-----------+-----------------------+-----------------------+---------+---------+


Formatted as L<Benchmark.pm|Benchmark> result:

                          Rate  f_d format_datetime  f_t format_time  f_d format_date 
  f_d format_datetime  20000/s                   --              -4%              -6% 
  f_t format_time      21000/s                   4%               --              -2% 
  f_d format_date      22000/s                   6%               2%               -- 
 
 Legends:
   f_d format_date: p_tags=format_date participant=format_date
   f_d format_datetime: p_tags=format_datetime participant=format_datetime
   f_t format_time: p_tags=format_time participant=format_time

Benchmark module startup overhead (C<< bencher -m DateTime::Format::ISO8601::Format::Formatting --module-startup >>):

 #table2#
 +-----------------------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
 | participant                       | time (ms) | mod_overhead_time | pct_faster_vs_slowest | pct_slower_vs_fastest |  errors | samples |
 +-----------------------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+
 | DateTime::Format::ISO8601::Format |       8.7 |               2.6 |                 0.00% |                42.28% | 4.6e-05 |      20 |
 | perl -e1 (baseline)               |       6.1 |               0   |                42.28% |                 0.00% | 2.7e-05 |      20 |
 +-----------------------------------+-----------+-------------------+-----------------------+-----------------------+---------+---------+


Formatted as L<Benchmark.pm|Benchmark> result:

                          Rate  DFI:F  perl -e1 (baseline) 
  DFI:F                114.9/s     --                 -29% 
  perl -e1 (baseline)  163.9/s    42%                   -- 
 
 Legends:
   DFI:F: mod_overhead_time=2.6 participant=DateTime::Format::ISO8601::Format
   perl -e1 (baseline): mod_overhead_time=0 participant=perl -e1 (baseline)

To display as an interactive HTML table on a browser, you can add option C<--format html+datatables>.

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/Bencher-Scenarios-DateTime-Format-ISO8601-Format>.

=head1 SOURCE



( run in 0.691 second using v1.01-cache-2.11-cpan-d01c6094234 )