Branch Coverage

blib/lib/ClickHouse/Encoder/TCP.pm
Criterion Covered Total %
branch 52 68 76.4


line true false branch
134 11 1 if $rev >= 54058
136 10 2 if $rev >= 54401
148 9 4 unless defined $s
149 3 1 if (ref $s eq "HASH")
173 1 3 unless defined $block_bytes
174 2 0 if (defined $o{'compress'} and $o{'compress'} ne "none" and $o{'compress'} ne "raw")
191 2 0 if (defined $o{'compress'} and $o{'compress'} ne "none" and $o{'compress'} ne "raw")
219 4 16 if ($type == 0) { }
1 15 elsif ($type == 2) { }
2 13 elsif ($type == 3) { }
6 7 elsif ($type == 4 or $type == 5) { }
1 6 elsif ($type == 6) { }
3 3 elsif ($type == 1 or $type == 7 or $type == 8) { }
1 2 elsif ($type == 11) { }
1 1 elsif ($type == 14) { }
230 3 1 if ($pkt{'revision'} >= 54058)
234 2 1 if ($pkt{'revision'} >= 54372)
238 2 1 if ($pkt{'revision'} >= 54401)
245 0 1 if $offset + 4 > length $bytes
252 0 1 if $offset >= length $bytes
278 0 1 if $offset >= length $bytes
283 0 1 if $offset >= length $bytes
345 2 3 $bufref ? :
348 0 4 unless defined $got
349 1 3 if $got == 0
360 4 4 if $ok
361 0 4 unless $@ =~ /truncated/
368 1 3 if (exists $pkt->{'block_offset'})
370 1 0 if ($compressed) { }
385 1 0 if $ok
390 0 0 unless $@ =~ /truncated|extends past|need \d+ more/
404 0 0 if $ok
405 0 0 unless $@ =~ /truncated/
414 2 2 if $bufref