blib/lib/App/RecordStream/Clumper.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 3 totaltotal 90.3% 28 / 31 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/App/RecordStream/Clumper/WrappedClumperCallback.pm ↑ Summary blib/lib/App/RecordStream/Deaggregator.pm »
1 package App::RecordStream::Clumper;
2  
3 112 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 112 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 112 ▶use App::RecordStream::BaseRegistry;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 112 ▶use base ('App::RecordStream::BaseRegistry');
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 sub make_clumper
11 {
12 9 ▶ my $registry_class = shift;
Subroutine make_clumper: called CC=1 SCAR=0.0
Pod undocumented
13 9 my $spec = shift;
14  
15 9 return $registry_class->parse_single_nameless_implementation($spec);
16 }
17  
18 sub typename
19 {
20 21 ▶ return "clumper";
Subroutine typename: called CC=1 SCAR=0.0
Pod undocumented
21 }
22  
23 sub usage {
24 2 ▶ my $ret = "";
Subroutine usage: called CC=1 SCAR=0.0
Pod undocumented
25 2 $ret .= <<USAGE;
26 CLUMPING:
27 __FORMAT_TEXT__
28 "Clumping" defines a way of taking a stream of input records and rearranging
29 them into to groups for consideration. The most common "consideration" for
30 such a group of records is the application of one or more aggregators by
31 recs-collate and the most common clumpers are those specifiable by
32 recs-collate's normal options. However, other recs scripts can use
33 "clumpers" and much more complex clumping is possible. A list of clumpers
34 can be found via the --list-clumpers option on recs-collate and
35 documentation for individual clumpers can be inspected via --show-clumper.
36 __FORMAT_TEXT__
37  
38 Examples:
39 Group adjacent records for each host and output each such group's size.
40 recs-collate -c keylru,host,1 -a ct
41 Output the successive differences of the time field.
42 recs-collate -c window,2 --dla 'time_delta=xform(recs, <<{{#1/time}} - {{#0/time}}>>)'
43  
44 Full list:
45 USAGE
46 2 $ret .= __PACKAGE__->list_implementations(" ");
47 2 return $ret;
48 }
49  
50 112 1;
« blib/lib/App/RecordStream/Clumper/WrappedClumperCallback.pm ↑ Summary blib/lib/App/RecordStream/Deaggregator.pm »