bin/rrr-overview

filter: Statementstmt 70.0% 21 / 30 Branchbran 16.6% 2 / 12 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 53.8% 28 / 52 CC 1 SCAR 0.0
CC
1
Cov
51%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« bin/rrr-client ↑ Summary bin/rrr-aggregate »
1 #!/usr/bin/perl
2  
3 =head1 NAME
4  
5 rrr-overview - summarize the dataset
6  
7 =head1 SYNOPSIS
8  
9 rrr-overview [options] principal_recentfile
10  
11 =head1 OPTIONS
12  
13 =over 8
14  
15 =cut
16  
17 1 my $optpod = <<'=back';
18  
19 =item B<--help|h>
20  
21 Prints a brief message and exits.
22  
23 =item B<--verbose|v+>
24  
25 More feedback.
26  
27 =back
28  
29 =head1 DESCRIPTION
30  
31 rersyncrecent is a project to get speedy rsync operation on large
32 trees over multiple hosts. It maintains a collection of files with
33 metadata (so called recentfiles) that represent adjacent or
34 overlapping timespans of file change events.
35  
36 rrr-overview summarizes the contents of the recentfiles.
37  
38 =cut
39  
40 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
41 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
42  
43 1 ▶use File::Rsync::Mirror::Recent;
Subroutine BEGIN: called CC=1 SCAR=0.0
44 1 ▶use Getopt::Long;
Subroutine BEGIN: called CC=1 SCAR=0.0
45 1 ▶use Pod::Usage qw(pod2usage);
Subroutine BEGIN: called CC=1 SCAR=0.0
46  
47 1 our %Opt;
48 1 my @opt = $optpod =~ /B<--(\S+)>/g;
49  
50 1 ▶GetOptions(\%Opt,
Branch: 1 branch
BranchTrueFalseTotal
&GetOptions(\%main::Opt, @opt) or pod2usage(2) 1 0 1
51 @opt,
52 ) or pod2usage(2);
53  
54 1 ▶if ($Opt{help}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($main::Opt{"help"}) 1 0 1
55 1 pod2usage(0);
56 }
57  
58 0 ▶if (@ARGV > 1) {
Branch: 3 branches
BranchTrueFalseTotal
if (@ARGV > 1) { } 0 0 0
elsif (0 == @ARGV and -f 'RECENT.recent') { } 0 0 0
elsif (1 == @ARGV) { } 0 0 0
59 0 pod2usage(2);
60 ▶} elsif (0 == @ARGV and -f "RECENT.recent") {
Condition0%0/3
0 == @ARGV and -f "RECENT.recent"
!ll&&!rl&&r
000
MC/DC0%0/2
0 == @ARGV and -f "RECENT.recent"
0 == @ARGV -f "RECENT.recent"
Truth table0%0/3
A and B
A= 0 == @ARGVB= -f "RECENT.recent"
ABresult
0X0
100
111
61 0 @ARGV = "RECENT.recent";
62 } elsif (1 == @ARGV) {
63 } else {
64 0 pod2usage(2);
65 }
66  
67 0 my $rf = File::Rsync::Mirror::Recent->new
68 (
69 local => $ARGV[0],
70 );
71 0 my @args;
72 0 ▶if ($Opt{verbose}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($main::Opt{"verbose"}) 0 0 0
73 0 push @args, "verbose", $Opt{verbose};
74 }
75 0 print $rf->overview(@args);
76  
77 __END__
« bin/rrr-client ↑ Summary bin/rrr-aggregate »