Acme-CPANModules-CalculatingDayOfWeek
view release on metacpan or search on metacpan
":PerlExecFiles"
],
"skips" : [],
"switch" : []
}
},
"name" : "@Author::PERLANCAR/Test::Compile",
"version" : "2.058"
},
{
"class" : "Dist::Zilla::Plugin::Test::Perl::Critic::Subset",
"config" : {
"Dist::Zilla::Plugin::Test::Perl::Critic::Subset" : {
"finder" : [
":ExecFiles",
":InstallModules",
":TestFiles"
]
}
},
"name" : "@Author::PERLANCAR/Test::Perl::Critic::Subset",
"version" : "3.001.006"
},
{
"class" : "Dist::Zilla::Plugin::Test::Rinci",
"name" : "@Author::PERLANCAR/Test::Rinci",
"version" : "0.040"
},
{
"class" : "Dist::Zilla::Plugin::StaticInstall",
"config" : {
- ':InstallModules'
needs_display: 0
phase: test
script_finder:
- ':PerlExecFiles'
skips: []
switch: []
name: '@Author::PERLANCAR/Test::Compile'
version: '2.058'
-
class: Dist::Zilla::Plugin::Test::Perl::Critic::Subset
config:
Dist::Zilla::Plugin::Test::Perl::Critic::Subset:
finder:
- ':ExecFiles'
- ':InstallModules'
- ':TestFiles'
name: '@Author::PERLANCAR/Test::Perl::Critic::Subset'
version: 3.001.006
-
class: Dist::Zilla::Plugin::Test::Rinci
name: '@Author::PERLANCAR/Test::Rinci'
version: '0.040'
-
class: Dist::Zilla::Plugin::StaticInstall
config:
Dist::Zilla::Plugin::StaticInstall:
dry_run: 0
SYNOPSIS
To run benchmark with default option:
% bencher --cpanmodules-module CalculatingDayOfWeek
To run module startup overhead benchmark:
% bencher --module-startup --cpanmodules-module CalculatingDayOfWeek
For more options (dump scenario, list/include/exclude/add participants,
list/include/exclude/add datasets, etc), see bencher or run "bencher
--help".
ACME::CPANMODULES ENTRIES
Date::DayOfWeek
Author: RBOW <https://metacpan.org/author/RBOW>
Both Date::DayOfWeek and Time::DayOfWeek are lightweight modules.
Time::DayOfWeek
Author: PIP <https://metacpan.org/author/PIP>
(2 cores)*, OS: *GNU/Linux Ubuntu version 20.04*, OS kernel: *Linux
version 5.4.0-91-generic*.
Benchmark command (default options):
% bencher --cpanmodules-module CalculatingDayOfWeek
Result formatted as table:
#table1#
{dataset=>"date1"}
+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
| participant | rate (/s) | time (üs) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples |
+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
| DateTime | 37000 | 27 | 0.00% | 8030.29% | 3.8e-08 | 24 |
| Date::DayOfWeek::dayofweek | 562000 | 1.78 | 1415.39% | 436.51% | 3.8e-10 | 20 |
| Date::Calc::Day_of_Week | 650000 | 1.54 | 1650.85% | 364.36% | 9.3e-10 | 20 |
| Time::DayOfWeek::DoW | 1030000 | 0.97 | 2677.36% | 192.73% | 6.3e-10 | 20 |
| Time::Moment | 3020000 | 0.331 | 8030.29% | 0.00% | 1.7e-10 | 20 |
+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
<pm:Time::Moment> is also a nice alternative to <pm:DateTime>. Although it's not
as featureful as DateTime, it is significantly more lightweight. Compared to
<pm:Date::Calc>, Time::Moment's API is closer to DateTime's. Being an XS module,
it's also faster.
_
},
],
bench_datasets => [
{name=>'date1', args => {day=>20, month=>11, year=>2019}},
],
};
1;
# ABSTRACT: List of modules to calculate day of week
__END__
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
=head1 SYNOPSIS
To run benchmark with default option:
% bencher --cpanmodules-module CalculatingDayOfWeek
To run module startup overhead benchmark:
% bencher --module-startup --cpanmodules-module CalculatingDayOfWeek
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 ACME::CPANMODULES ENTRIES
=over
=item L<Date::DayOfWeek>
Author: L<RBOW|https://metacpan.org/author/RBOW>
Both L<Date::DayOfWeek> and L<Time::DayOfWeek> are lightweight modules.
lib/Acme/CPANModules/CalculatingDayOfWeek.pm view on Meta::CPAN
Run on: perl: I<< v5.38.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 command (default options):
% bencher --cpanmodules-module CalculatingDayOfWeek
Result formatted as table:
#table1#
{dataset=>"date1"}
+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
| participant | rate (/s) | time (μs) | pct_faster_vs_slowest | pct_slower_vs_fastest | errors | samples |
+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
| DateTime | 37000 | 27 | 0.00% | 8030.29% | 3.8e-08 | 24 |
| Date::DayOfWeek::dayofweek | 562000 | 1.78 | 1415.39% | 436.51% | 3.8e-10 | 20 |
| Date::Calc::Day_of_Week | 650000 | 1.54 | 1650.85% | 364.36% | 9.3e-10 | 20 |
| Time::DayOfWeek::DoW | 1030000 | 0.97 | 2677.36% | 192.73% | 6.3e-10 | 20 |
| Time::Moment | 3020000 | 0.331 | 8030.29% | 0.00% | 1.7e-10 | 20 |
+----------------------------+-----------+-----------+-----------------------+-----------------------+---------+---------+
lib/Acme/CPANModules_ScenarioR/CalculatingDayOfWeek.pm view on Meta::CPAN
## no critic
package Acme::CPANModules_ScenarioR::CalculatingDayOfWeek;
our $VERSION = 0.002; # VERSION
our $results = [[200,"OK",[{_name=>"participant=DateTime",_succinct_name=>"D",errors=>3.8e-08,participant=>"DateTime",pct_faster_vs_slowest=>0,pct_slower_vs_fastest=>80.570996978852,rate=>37000,samples=>24,time=>27},{_name=>"participant=Date::DayOfWe...
1;
# ABSTRACT: List of modules to calculate day of week
=head1 DESCRIPTION
This module is automatically generated by Pod::Weaver::Plugin::Bencher::Scenario during distribution build.
A Acme::CPANModules_ScenarioR::* module contains the raw result of sample benchmark and might be useful for some stuffs later.
t/author-critic.t view on Meta::CPAN
unless ($ENV{AUTHOR_TESTING}) {
print qq{1..0 # SKIP these tests are for testing by the author\n};
exit
}
}
use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::Perl::Critic::Subset 3.001.006
use Test::Perl::Critic (-profile => "") x!! -e "";
my $filenames = ['lib/Acme/CPANModules/CalculatingDayOfWeek.pm','lib/Acme/CPANModules_ScenarioR/CalculatingDayOfWeek.pm'];
unless ($filenames && @$filenames) {
$filenames = -d "blib" ? ["blib"] : ["lib"];
}
all_critic_ok(@$filenames);
[@Author::PERLANCAR]
[-Acme::CPANModules]
[-Bencher::Scenario]
result_split_fields=dataset
( run in 1.572 second using v1.01-cache-2.11-cpan-49f99fa48dc )