Condition Coverage

lib/Kafka/Producer.pm
Criterion Covered Total %
condition 48 82 58.5


and 3 conditions

line !l l&&!r l&&r condition
237 9 0 70 defined &_NUMBER($self->{'Timeout'}) and int $self->{'Timeout'} * 1000 >= 1
9 0 70 defined &_NUMBER($self->{'Timeout'}) and int $self->{'Timeout'} * 1000 >= 1 and int $self->{'Timeout'} * 1000 <= $Kafka::Producer::MAX_INT32
240 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
331 0 7 5063 defined $topic and $topic eq '' || defined &_STRING($topic)
335 0 10 5052 defined $partition and &isint($partition)
10 0 5052 defined $partition and &isint($partition) and $partition >= 0
348 1 6 10035 defined $message and $message eq '' || defined &_STRING($message)
418 5016 3 0 defined $compression_codec and $compression_codec == $Kafka::Producer::COMPRESSION_LZ4

or 2 conditions

line l !l condition
225 46 61 $self->{'ClientId'} //= 'producer'
424 0 0 $keys->[$key_index] // ''

or 3 conditions

line l !l&&r !l&&!r condition
230 0 80 7 $self->{'ClientId'} eq '' or defined &_STRING($self->{'ClientId'})
235 60 0 0 $self->{'Connection'}{'Timeout'} //= $Kafka::Producer::REQUEST_TIMEOUT
19 60 0 $self->{'Timeout'} //= ($self->{'Connection'}{'Timeout'} //= $Kafka::Producer::REQUEST_TIMEOUT)
240 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
331 0 5063 7 $topic eq '' || defined &_STRING($topic)
337 26 5021 5 defined &_STRING($messages) or &_ARRAY($messages)
339 5019 22 6 not defined $keys or defined &_STRING($keys)
5041 0 6 not defined $keys or defined &_STRING($keys) or &_ARRAY($keys)
342 5026 3 12 not defined $compression_codec or $known_compression_codecs{$compression_codec}
343 5029 0 0 not defined $timestamps or defined &_POSINT($timestamps)
5029 0 0 not defined $timestamps or defined &_POSINT($timestamps) or &_ARRAY($timestamps)
348 0 10035 6 $message eq '' || defined &_STRING($message)
362 0 0 0 not defined $key or $key eq ''
0 0 0 not defined $key or $key eq '' or defined &_STRING($key)
369 0 1 0 $keys eq '' or defined &_STRING($keys)
387 0 0 0 not defined $ts or defined &_POSINT($ts)
418 0 0 5019 defined $compression_codec and $compression_codec == $Kafka::Producer::COMPRESSION_LZ4 or defined $timestamps