Branch Coverage

lib/Kafka/Protocol.pm
Criterion Covered Total %
branch 69 126 54.7


line true false branch
654 0 0 if ($api_version >= 1)
706 0 0 $is_v1 ? :
713 0 0 if ($is_v1)
717 0 0 if ($is_v1)
893 0 98 $is_v2 ? :
0 98 $is_v1 ? :
912 0 98 $is_v2 ? :
925 0 98 if defined $data[$i]
974 0 5015 $is_v3 ? :
977 0 5015 if ($is_v3) { }
1056 0 5021 if ($is_v1 or $is_v2 or $is_v3)
1137 0 27 $is_v1 ? :
1138 0 27 $is_v1 ? :
1153 0 27 $is_v1 ? :
1230 0 23 $is_v1 ? :
1254 0 23 if ($is_v1) { }
1486 0 0 if ($is_v1)
1522 0 0 if ($is_v1)
1771 0 5021 if ($is_v1 or $is_v2 or $is_v3) { }
1836 4 0 if (length $data > 16)
1838 3 1 if ($header eq $XERIAL_SNAPPY_MAGIC_HEADER)
1840 0 3 unless $x_compatversion == $XERIAL_SNAPPY_FILE_VERSION
1841 0 3 unless $x_version == $XERIAL_SNAPPY_FILE_VERSION
1845 0 4 if length $data < 4
1848 0 4 if length $data < $compressed_frame_length
1851 0 4 unless defined $uncompressed_frame
1856 1 3 if ($raw_format_suspected)
1868 0 4 unless defined $compressed_block
1877 0 7 if 'Kafka::Protocol'->debug_level // !1
1884 3 4 if ($compression_codec == $Kafka::Protocol::COMPRESSION_GZIP) { }
3 1 elsif ($compression_codec == $Kafka::Protocol::COMPRESSION_SNAPPY) { }
1 0 elsif ($compression_codec == $Kafka::Protocol::COMPRESSION_LZ4) { }
1896 0 1 if (&Compress::LZ4Frame::looks_like_lz4frame($data)) { }
1905 0 5 unless defined $decompressed
1914 2 2 if ($compression_codec == $Kafka::Protocol::COMPRESSION_GZIP) { }
2 0 elsif ($compression_codec == $Kafka::Protocol::COMPRESSION_SNAPPY) { }
0 0 elsif ($compression_codec == $Kafka::Protocol::COMPRESSION_LZ4) { }
1947 12 25072 if (defined $_override_offset)
1965 0 25084 if ($is_v1_msg_format)
1970 25084 0 $Key_length == $NULL_BYTES_LENGTH ? :
1972 0 25084 $Value_length == $NULL_BYTES_LENGTH ? :
1974 7 25077 if (my $compression_codec = $Message->{'Attributes'} & $COMPRESSION_CODEC_MASK) { }
2013 0 25164 $v1_format ? :
2023 0 25164 $v1_format ? :
0 25164 $key_length ? :
25164 0 $value_length ? :
0 25164 $v1_format ? :
0 25164 $key_length ? :
25164 0 $value_length ? :
2058 0 25160 if ($MessageSet->{'Timestamp'})
2064 4 10123 if ($compression_codec)
2146 2 25088 if $MessageSetSize < 22
2171 0 25088 if ($is_v1_msg_format and $MessageSetSize < 30)
2176 0 25088 $is_v1_msg_format ? :
2178 0 25088 $is_v1_msg_format ? :
2188 0 25088 if $Key_length != $NULL_BYTES_LENGTH
2190 25086 2 if ($bin_stream_length >= $response->{'stream_offset'} + 4) { }
2191 0 25086 if $Key_length != $NULL_BYTES_LENGTH
2208 25086 0 if $Value_length != $NULL_BYTES_LENGTH
2210 25084 2 if ($bin_stream_length >= $response->{'stream_offset'}) { }
2211 25084 0 if $Value_length != $NULL_BYTES_LENGTH
2220 25084 4 if ($local_template) { }
2239 129 30660 if ($string eq '') { }