NAME

Bencher::Scenario::LogGer::NullOutput - Benchmark Log::ger logging speed with the default/null output

VERSION

This document describes version 0.007 of Bencher::Scenario::LogGer::NullOutput (from Perl distribution Bencher-Scenarios-LogGer), released on 2017-06-29.

SYNOPSIS

To run benchmark with default option:

% bencher -m LogGer::NullOutput

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

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 Bencher and bencher (CLI) for more details.

BENCHMARKED MODULES

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

Log::Any 1.045

Log::Fast v2.0.0

Log::Log4perl 1.47

Log::ger 0.010

Log::ger::Plugin::OptAway 0.003

Log::ger::Plugin::SingleLog 0.001

BENCHMARK PARTICIPANTS

  • Log::ger-1mil_log_trace (command)

    Command line:

    #TEMPLATE: #perl -MLog::ger -e for(1..1_000_000) { log_trace(q[]) }
  • Log::ger-1mil_log_is_trace (command)

    Command line:

    #TEMPLATE: #perl -MLog::ger -e for(1..1_000_000) { log_is_trace() }
  • Log::ger+LGP:OptAway-1mil_log_trace (command)

    Command line:

    #TEMPLATE: #perl -MLog::ger::Plugin=OptAway -MLog::ger -e for(1..1_000_000) { log_trace(q[]) }
  • Log::ger+LGP:SingleLog-1mil_log_trace (command)

    Command line:

    #TEMPLATE: #perl -MLog::ger::Plugin=SingleLog -MLog::ger -e for(1..1_000_000) { log("trace", q[]) }
  • Log::ger+LGP:SingleLog-1mil_log_6 (command)

    Command line:

    #TEMPLATE: #perl -MLog::ger::Plugin=SingleLog -MLog::ger -e for(1..1_000_000) { log(6, q[]) }
  • Log::Fast-1mil_DEBUG (command)

    Command line:

    #TEMPLATE: #perl -MLog::Fast -e $LOG = Log::Fast->global; $LOG->level("INFO"); for(1..1_000_000) { $LOG->DEBUG(q()) }
  • Log::Fast-1mil_is_debug (command)

    Command line:

    #TEMPLATE: #perl -MLog::Fast -e $LOG = Log::Fast->global; for(1..1_000_000) { $LOG->level() eq "DEBUG" }
  • Log::Any-no_adapter-1mil_log_trace (command)

    Command line:

    #TEMPLATE: #perl -MLog::Any -e my $log = Log::Any->get_logger; for(1..1_000_000) { $log->trace(q[]) }
  • Log::Any-no_adapter-1mil_is_trace (command)

    Command line:

    #TEMPLATE: #perl -MLog::Any -e my $log = Log::Any->get_logger; for(1..1_000_000) { $log->is_trace }
  • Log::Any-null_adapter-1mil_log_trace (command)

    Command line:

    #TEMPLATE: #perl -MLog::Any -MLog::Any::Adapter -e Log::Any::Adapter->set(q[Null]); my $log = Log::Any->get_logger; for(1..1_000_000) { $log->trace(q[]) }
  • Log::Any-null_adapter-1mil_is_trace (command)

    Command line:

    #TEMPLATE: #perl -MLog::Any -MLog::Any::Adapter -e Log::Any::Adapter->set(q[Null]); my $log = Log::Any->get_logger; for(1..1_000_000) { $log->is_trace }
  • Log::Log4perl-easy-1mil_trace (command)

    Command line:

    #TEMPLATE: #perl -MLog::Log4perl=:easy -e Log::Log4perl->easy_init($ERROR); for(1..1_000_000) { TRACE "" }
  • Log::Log4perl::Tiny-1mil_trace (command)

    Command line:

    #TEMPLATE: #perl -MLog::Log4perl::Tiny=:easy -e for(1..1_000_000) { TRACE "" }

SAMPLE BENCHMARK RESULTS

Run on: perl: v5.24.0, CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (4 cores), OS: GNU/Linux Debian version 8.5, OS kernel: Linux version 3.16.0-4-amd64.

Benchmark with default options (bencher -m LogGer::NullOutput):

#table1#
+---------------------------------------+-----------+-----------+------------+-----------+---------+
| participant                           | rate (/s) | time (ms) | vs_slowest |  errors   | samples |
+---------------------------------------+-----------+-----------+------------+-----------+---------+
| Log::Log4perl::Tiny-1mil_trace        |       1.4 |     710   |        1   |   0.0025  |       7 |
| Log::ger+LGP:SingleLog-1mil_log_6     |       1.8 |     570   |        1.3 |   0.0033  |       7 |
| Log::ger+LGP:SingleLog-1mil_log_trace |       1.9 |     520   |        1.4 |   0.0012  |       6 |
| Log::Any-null_adapter-1mil_log_trace  |       2.4 |     420   |        1.7 |   0.0013  |       6 |
| Log::Fast-1mil_is_debug               |       3.2 |     310   |        2.3 |   0.0024  |       6 |
| Log::Any-no_adapter-1mil_is_trace     |       4.1 |     250   |        2.9 |   0.00065 |       6 |
| Log::Any-null_adapter-1mil_is_trace   |       4.1 |     240   |        2.9 |   0.0011  |       7 |
| Log::Log4perl-easy-1mil_trace         |       5.5 |     180   |        3.9 |   0.0012  |       6 |
| Log::Any-no_adapter-1mil_log_trace    |      11   |      95   |        7.5 |   0.00036 |       6 |
| Log::Fast-1mil_DEBUG                  |      11   |      92   |        7.8 |   0.00016 |       7 |
| Log::ger-1mil_log_is_trace            |      16   |      63   |       11   |   0.00042 |       6 |
| Log::ger-1mil_log_trace               |      17.5 |      57.1 |       12.5 | 3.8e-05   |       6 |
| Log::ger+LGP:OptAway-1mil_log_trace   |      35   |      28   |       25   | 7.9e-05   |       6 |
+---------------------------------------+-----------+-----------+------------+-----------+---------+

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

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenarios-LogGer.

SOURCE

Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-LogGer.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-LogGer

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.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 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.