Branch Coverage

blib/lib/Net/Statsd.pm
Criterion Covered Total %
branch 25 36 69.4


line true false branch
25 1 0 unless (defined $sample_rate)
58 0 10004 unless (defined $delta)
62 3 10001 unless (defined $sample_rate)
66 10003 1 if (not ref $stats) { }
0 1 elsif (ref $stats eq 'HASH') { }
83 0 6 unless defined $value
100 4952 5056 unless ($sampled_data)
106 2 5054 if (not $SOCK && $SOCK_PEER or "${HOST}:$PORT" ne $SOCK_PEER)
112 0 2 unless ($SOCK = 'IO::Socket::INET'->new('Proto', 'udp', 'PeerAddr', $HOST, 'PeerPort', $PORT))
113 0 0 unless $our $_warn_once{"${HOST}:$PORT"}++
130 5 5054 if (ref $value eq 'ARRAY') { }
140 0 5059 if (not defined $r) { }
0 5059 elsif ($r != length $packet) { }
157 0 20010 if (not $data or ref $data ne 'HASH')
161 1 20009 unless (defined $sample_rate)
166 9 20001 if ($sample_rate >= 1)
179 10086 9915 if (rand() <= $sample_rate)
187 0 15123 if (ref $value eq 'ARRAY') { }