Scenario/Log/ger/OutputStartup.pm

filter: Statementstmt 100% 26 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 31 / 31 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Scenario/Log/ger/NumericLevel.pm ↑ Summary Scenario/Log/ger/Overhead.pm »
1 package Bencher::Scenario::Log::ger::OutputStartup;
2  
3 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Data::Dmp;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use File::Temp qw(tempdir tempfile);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
11 1 our $DATE = '2024-05-12'; # DATE
12 1 our $DIST = 'Bencher-ScenarioBundle-Log-ger'; # DIST
13 1 our $VERSION = '0.020'; # VERSION
14  
15 1 my $str;
16 1 my $ary = [];
17 1 my ($fh, $fname) = tempfile();
18 1 my $dname = tempdir(CLEANUP => 1);
19  
20 1 our %output_modules = (
21 Null => {},
22 String => { string => \$str },
23 Array => { array => $ary },
24  
25 ArrayRotate => { array => $ary },
26 File => { path => $fname },
27 Screen => {},
28 Callback => {},
29 FileWriteRotate => { dir => $dname, prefix => 'prefix' },
30 DirWriteRotate => { path => $dname },
31 LogAny => {},
32 #LogDispatchOutput => { output => 'ArrayWithLimits', args => {array => $ary} }, # Log::Dispatch::ArrayWithLimits already removed from CPAN
33 Composite => { outputs => {Screen => {conf=>{}}, File => {conf=>{path=>$fname}}} },
34 Syslog => { ident => 'test' },
35 );
36  
37 our $scenario = {
38 modules => {
39 'Log::ger::Output::Composite' => {version=>'0.016'},
40 'Log::ger::Output::File' => {version=>'0.002'},
41 'Log::ger::Output::LogAny' => {version=>'0.003'},
42 'Log::ger::Output::Screen' => {version=>'0.018'},
43 },
44 participants => [
45 {name=>"baseline", perl_cmdline => ["-e1"]},
46  
47 map {
48 1 (
49 +{
50 name => "load-$_",
51 module => "Log::ger::Output::$_",
52 perl_cmdline => ["-mLog::ger::Output::$_", "-e1"],
53 },
54 +{
55 name => "init-with-$_",
56 module => "Log::ger::Output::$_",
57 #perl_cmdline => ["-e", "use Log::ger::Output '$_'; use Log::ger"],
58 12 perl_cmdline => ["-e", "use Log::ger::Output '$_' => %{ +".dmp($output_modules{$_})." }; use Log::ger"],
59 },
60 )
61 } sort keys %output_modules,
62 ],
63 };
64  
65 1 1;
66 # ABSTRACT:
67  
68 __END__
« Scenario/Log/ger/NumericLevel.pm ↑ Summary Scenario/Log/ger/Overhead.pm »