Branch Coverage

blib/lib/Pg/Explain.pm
Criterion Covered Total %
branch 136 160 85.0


line true false branch
117 0 168 if 0 < scalar @_
118 245 219 if 0 < scalar @_
119 20 168 if 0 < scalar @_
120 251 227 if 0 < scalar @_
121 76 161 if 0 < scalar @_
122 10 201 if 0 < scalar @_
123 9 187 if 0 < scalar @_
124 46 58 if 0 < scalar @_
125 8 62 if 0 < scalar @_
129 3 0 if ($self->top_node->buffers)
130 2 1 if $self->planning_buffers
133 0 0 if $self->planning_buffers
147 16 10 if ($self->trigger_times) { }
179 0 1568 unless defined $id
181 1509 59 if defined $node
220 42 13650 if /^\+-+\+\z/u
221 144 13506 if /^[-\x{2500}\x{2550}]+\z/u
222 32 13474 if /^(?:\x{251c}|\x{255f}|\x{2560}|\x{255e})[\x{2500}\x{2550}]+(?:\x{2524}|\x{2562}|\x{2563}|\x{2561})\z/u
225 0 13474 if /^\+-+\+\z/u
226 16 13458 if /^\x{2514}\x{2500}+\x{2518}\z/u
227 16 13442 if /^\x{255a}\x{2550}+\x{255d}\z/u
228 16 13426 if /^\x{250c}\x{2500}+\x{2510}\z/u
229 16 13410 if /^\x{2554}\x{2550}+\x{2557}\z/u
244 203 13207 if /^\s*QUERY PLAN\s*\z/u
247 198 13009 if /^\(\d+ rows?\)\z/u
268 1 513 if (0 == scalar @_)
271 0 513 if (1 == scalar @_) { }
0 513 elsif (1 == scalar(@_) % 2) { }
272 0 0 if ('HASH' eq ref $_[0]) { }
286 179 334 if ($args{'source_file'}) { }
334 0 elsif ($args{'source'}) { }
287 1 178 if $args{'source'}
292 47 287 if (&Encode::is_utf8($args{'source'})) { }
332 199 4375 unless $self->{'top_node'}
351 67 443 if ($source =~ m[^\s*]mu) { }
70 373 elsif ($source =~ / ^ \s* \[ \s* \{ \s* "Plan" \s* : \s* \{ /msux) { }
4 369 elsif ($source =~ / ^ \s* \{ \s* "Query \s+ Text" \s* : \s* ".*", \s* "Plan" \s* : \s* \{ .* \} \s* \z /msux) { }
66 303 elsif ($source =~ / ^ \s* - \s+ Plan: \s* \n /msux) { }
4 299 elsif ($source =~ / ^ \s* Query \s+ Text: \s+ ".*" \s+ Plan: \s* \n /msux) { }
422 0 510 unless defined $self->{'top_node'}
425 99 411 unless $self->top_node->is_analyzed
428 22 1262 if $_->ctes
435 0 22 if 0 == scalar @cte_scans
442 0 31 if 0 == scalar @matching_cte_scans
451 0 31 unless $total_time_of_scans
452 8 23 unless $cte_total_time
473 0 510 unless defined $self->{'top_node'}
476 99 411 unless $self->top_node->is_analyzed
479 34 1250 if $_->initplans
493 1 36 unless $initnode->total_inclusive_time
502 22 14 if ($parent->initplans_metainfo->[$idx])
508 30 0 if $element =~ s/\A\$(\d+)\z/$1/u
530 22 32 unless $explicit_re
531 9 23 unless $user->extra_info
533 18 5 if $full_extra_info =~ /$explicit_re/u
543 17 19 if (0 < scalar @explicitnodes and $explicittime > $initnode->total_inclusive_time) { }
19 0 elsif ($implicittime > $initnode->total_inclusive_time) { }
556 0 48 unless $node->total_exclusive_time
578 0 510 unless defined $self->{'top_node'}
581 99 411 unless $self->top_node->is_analyzed
595 34 1250 if $node->initplans
596 24 1260 if $node->subplans
597 22 1262 if $node->ctes
600 22 1262 if defined $node->workers_launched
603 540 744 if $node->sub_nodes
641 8 81 if ($self->planning_buffers)
648 23 66 if ($self->planning_time)
651 5 84 if ($self->trigger_times)
656 4 85 if ($self->jit)
659 32 57 if ($self->execution_time)
662 17 72 if ($self->total_runtime)
695 38 12 if $self->planning_time
696 16 34 if $self->planning_buffers
697 50 0 if $self->execution_time
698 0 50 if $self->total_runtime
699 10 40 if $self->trigger_times
700 0 50 if $self->query
701 0 50 if $self->settings
703 8 42 if ($self->jit)
733 13 1 if 0 == scalar @extra_args