blib/lib/App/RecordStream/Aggregator/Count.pm

filter: Statementstmt 96.6% 29 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.9% 10 / 11 Podpod 0.0% 0 / 5 totaltotal 84.7% 39 / 46 CC 1 SCAR 0.9
CC
1
Cov
97%
long_usage
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« blib/lib/App/RecordStream/Aggregator/LinearRegression.pm ↑ Summary blib/lib/App/RecordStream/Operation/frommongo.pm »
1 package App::RecordStream::Aggregator::Count;
2  
3 7 our $VERSION = "4.0.23";
4  
5 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 7 ▶use App::RecordStream::Aggregator::MapReduce;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 7 ▶use App::RecordStream::Aggregator;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 7 ▶use App::RecordStream::DomainLanguage::Registry;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 7 ▶use base 'App::RecordStream::Aggregator::MapReduce';
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 sub map
15 {
16 195 ▶ return 1;
Subroutine map: called CC=1 SCAR=0.0
Pod undocumented
17 }
18  
19 sub reduce
20 {
21 122 ▶ my ($this, $cookie, $cookie2) = @_;
Subroutine reduce: called CC=1 SCAR=0.0
Pod undocumented
22  
23 122 return $cookie + $cookie2;
24 }
25  
26 sub argct
27 {
28 16 ▶ return 0;
Subroutine argct: called CC=1 SCAR=0.0
Pod undocumented
29 }
30  
31 sub long_usage
32 {
33 0 ▶ return <<EOF;
Subroutine long_usage: not called CC=1 SCAR=6.9
Pod undocumented
34 Usage: count
35 Counts number of (non-unique) records.
36 EOF
37 }
38  
39 sub short_usage
40 {
41 1 ▶ return "counts (non-unique) records";
Subroutine short_usage: called CC=1 SCAR=0.0
Pod undocumented
42 }
43  
44 7 App::RecordStream::Aggregator->register_implementation('count', __PACKAGE__);
45 7 App::RecordStream::Aggregator->register_implementation('ct', __PACKAGE__);
46  
47 7 App::RecordStream::DomainLanguage::Registry::register_ctor(__PACKAGE__, 'count');
48 7 App::RecordStream::DomainLanguage::Registry::register_ctor(__PACKAGE__, 'ct');
49  
50 7 1;
« blib/lib/App/RecordStream/Aggregator/LinearRegression.pm ↑ Summary blib/lib/App/RecordStream/Operation/frommongo.pm »