Condition Coverage

lib/Kafka/Producer.pm
Criterion Covered Total %
condition 54 91 59.3


and 3 conditions

line !l l&&!r l&&r condition
217 179 253 0 exists $p{$_} and $self->{$_} = $p{$_}
224 7 1 80 $self->{'ClientId'} eq '' || defined &_STRING($self->{'ClientId'}) and not utf8::is_utf8($self->{'ClientId'})
226 10 0 70 defined &_NUMBER($self->{'Timeout'}) and int $self->{'Timeout'} * 1000 >= 1
10 0 70 defined &_NUMBER($self->{'Timeout'}) and int $self->{'Timeout'} * 1000 >= 1 and int $self->{'Timeout'} * 1000 <= $Kafka::Producer::MAX_INT32
229 0 10 60 defined $required_acks and &isint($required_acks)
10 5 55 defined $required_acks and &isint($required_acks) and $required_acks == $Kafka::Producer::NOT_SEND_ANY_RESPONSE || $required_acks == $Kafka::Producer::WAIT_WRITTEN_TO_LOCAL_LOG || $required_acks == $Kafka::Producer::BLOCK_UNTIL_IS_COMMITTED
320 0 7 5063 defined $topic and $topic eq '' || defined &_STRING($topic)
7 1 5062 defined $topic and $topic eq '' || defined &_STRING($topic) and not utf8::is_utf8($topic)
322 0 10 5052 defined $partition and &isint($partition)
10 0 5052 defined $partition and &isint($partition) and $partition >= 0
335 1 2 10039 defined $message and $message eq '' || defined &_STRING($message) && !utf8::is_utf8($message)
347 0 0 0 defined &_STRING($key) and not utf8::is_utf8($key)
352 0 1 0 defined &_STRING($keys) and not utf8::is_utf8($keys)
399 5016 3 0 defined $compression_codec and $compression_codec == $Kafka::Producer::COMPRESSION_LZ4

or 2 conditions

line l !l condition
219 47 61 $self->{'ClientId'} //= 'producer'
405 0 0 $keys->[$key_index] // ''

or 3 conditions

line l !l&&r !l&&!r condition
224 0 81 7 $self->{'ClientId'} eq '' || defined &_STRING($self->{'ClientId'})
229 59 1 0 $required_acks == $Kafka::Producer::NOT_SEND_ANY_RESPONSE || $required_acks == $Kafka::Producer::WAIT_WRITTEN_TO_LOCAL_LOG || $required_acks == $Kafka::Producer::BLOCK_UNTIL_IS_COMMITTED
320 0 5063 7 $topic eq '' || defined &_STRING($topic)
324 26 5021 5 defined &_STRING($messages) or &_ARRAY($messages)
326 5019 22 6 not defined $keys or defined &_STRING($keys)
5041 0 6 not defined $keys or defined &_STRING($keys) or &_ARRAY($keys)
329 5026 3 12 not defined $compression_codec or $known_compression_codecs{$compression_codec}
330 5029 0 0 not defined $timestamps or defined &_POSINT($timestamps)
5029 0 0 not defined $timestamps or defined &_POSINT($timestamps) or &_ARRAY($timestamps)
335 0 10039 2 $message eq '' || defined &_STRING($message) && !utf8::is_utf8($message)
347 0 0 0 not defined $key or $key eq ''
0 0 0 not defined $key or $key eq '' or defined &_STRING($key) and not utf8::is_utf8($key)
352 0 0 1 $keys eq '' or defined &_STRING($keys) and not utf8::is_utf8($keys)
368 0 0 0 not defined $ts or defined &_POSINT($ts)
399 0 0 5019 defined $compression_codec and $compression_codec == $Kafka::Producer::COMPRESSION_LZ4 or defined $timestamps