Branch Coverage

blib/lib/Pg/Explain/Node.pm
Criterion Covered Total %
branch 231 264 87.5


line true false branch
216 22 5504 if 0 < scalar @_
217 0 1387 if 0 < scalar @_
218 0 1209 if 0 < scalar @_
219 0 2846 if 0 < scalar @_
220 25 974 if 0 < scalar @_
221 23 6575 if 0 < scalar @_
222 0 1370 if 0 < scalar @_
223 0 1536 if 0 < scalar @_
224 0 1370 if 0 < scalar @_
225 0 1370 if 0 < scalar @_
226 799 4255 if 0 < scalar @_
227 34 6997 if 0 < scalar @_
228 34 717 if 0 < scalar @_
229 22 675 if 0 < scalar @_
230 1004 99 if 0 < scalar @_
231 810 2107 if 0 < scalar @_
232 652 9322 if 0 < scalar @_
233 30 5722 if 0 < scalar @_
234 503 10452 if 0 < scalar @_
235 22 1313 if 0 < scalar @_
236 1291 1050 if 0 < scalar @_
237 147 1029 if 0 < scalar @_
238 76 326 if 0 < scalar @_
251 0 1516 if (0 == scalar @_)
254 0 1516 if (1 == scalar @_) { }
0 1516 elsif (1 == scalar(@_) % 2) { }
255 0 0 if ('HASH' eq ref $_[0]) { }
268 0 1516 unless defined $args{'type'}
272 4 6060 unless defined $args{$key}
277 316 1200 if ($self->type =~ / \A ( (?: Parallel \s+ )? (?: Seq \s Scan | Tid \s+ Scan | Bitmap \s+ Heap \s+ Scan | Foreign \s+ Scan | Update | Insert | Delete ) ) \s on \s (\S+) (?: \s+ (\S+) ) ? \z /msux) { }
21 1179 elsif ($self->type =~ / \A ( Bitmap \s+ Index \s+ Scan) \s on \s (\S+) \z /msux) { }
120 1059 elsif ($self->type =~ / \A ( (?: Parallel \s+ )? Index (?: \s Only )? \s Scan (?: \s Backward )? ) \s using \s (\S+) \s on \s (\S+) (?: \s+ (\S+) ) ? \z /msux) { }
29 1030 elsif ($self->type =~ / \A ( CTE \s Scan ) \s on \s (\S+) (?: \s+ (\S+) ) ? \z /msux) { }
3 1027 elsif ($self->type =~ / \A ( WorkTable \s Scan ) \s on \s (\S+) (?: \s+ (\S+) ) ? \z /msux) { }
11 1016 elsif ($self->type =~ / \A ( Function \s Scan ) \s on \s (\S+) (?: \s+ (\S+) )? \z /msux) { }
3 1013 elsif ($self->type =~ / \A ( Subquery \s Scan ) \s on \s (.+) \z /msux) { }
286 180 136 if defined $3
300 68 52 if defined $4
305 12 17 if defined $3
310 3 0 if defined $3
315 10 1 if defined $3
337 1516 0 if (defined $explain)
358 570 799 if ($self->extra_info) { }
377 0 0 if ($self->trigger_times) { }
409 5 30 if ($self->subplans) { }
443 34 3 unless $self->initplans
444 34 3 unless $self->initplans_metainfo
467 9 23 if ($self->ctes) { }
516 248 652 if ($self->sub_nodes) { }
548 539 0 if defined $self->estimated_row_width
549 539 0 if defined $self->estimated_rows
550 539 0 if defined $self->estimated_startup_cost
551 539 0 if defined $self->estimated_total_cost
552 458 81 if defined $self->actual_loops
553 443 96 if defined $self->actual_rows
554 443 96 if defined $self->actual_time_first
555 443 96 if defined $self->actual_time_last
556 539 0 if defined $self->type
557 280 259 if defined $self->scan_on
558 235 304 if defined $self->extra_info
559 30 509 if defined $self->initplans_metainfo
563 234 305 if defined $self->sub_nodes
564 30 509 if defined $self->initplans
565 21 518 if defined $self->subplans
567 80 459 if $self->buffers
569 9 530 if defined $self->cte_order
570 9 530 if (defined $self->ctes)
588 4 610 unless defined $self->actual_time_last
589 0 610 unless defined $self->actual_loops
601 0 167 unless defined $self->actual_time_last
602 0 167 unless defined $self->actual_loops
603 166 1 if 1 == $self->workers
629 2 249 unless $self->extra_info
632 252 250 unless $line =~ /^Rows Removed by (?:Conflict Filter|Filter|Index Recheck|Join Filter): (\d+)$/u
635 248 1 if 1 == $self->workers
649 1 250 unless defined $time
663 1 249 if $time < 0
677 0 3 unless $self->buffers
680 0 3 if 0 == scalar @nodes
700 29 28 if $self->sub_nodes
701 2 55 if $self->initplans
702 4 53 if $self->subplans
703 0 57 if $self->ctes
716 1316 1822 if $self->sub_nodes
717 113 3025 if $self->initplans
718 60 3078 if $self->subplans
719 75 3063 if $self->ctes
752 1984 434 defined $self->actual_loops || $self->never_executed ? :
766 91 201 unless defined $prefix
768 201 91 if "" ne $prefix
774 144 148 if ($self->scan_on)
776 11 133 if ($S->{'cte_name'}) { }
3 130 elsif ($S->{'function_name'}) { }
42 88 elsif ($S->{'index_name'}) { }
1 87 elsif ($S->{'subquery_name'}) { }
4 83 elsif ($S->{'worktable_name'}) { }
778 7 4 if $S->{'cte_alias'}
782 3 0 if $S->{'function_alias'}
785 34 8 if ($S->{'table_name'}) { }
787 23 11 if $S->{'table_alias'}
798 4 0 if $S->{'worktable_alias'}
802 54 29 if $S->{'table_alias'}
806 241 51 if ($self->is_analyzed)
808 6 235 if ($self->never_executed) { }
227 8 elsif (defined $self->actual_time_last) { }
823 161 131 if ($self->extra_info)
827 62 230 if ($self->buffers)
833 9 283 if ($self->cte_order)
840 11 281 if ($self->initplans)
845 8 4 if ($meta) { }
855 139 153 if ($self->sub_nodes)
858 6 286 if ($self->subplans)
877 28 29 if ($self->scan_on)
881 2 55 if ($self->cte_order)
885 45 12 if ($self->extra_info)
888 3 88 if ($copy =~ /^Foreign File:\s+(\S.*?)\s*$/u)
892 40 48 unless $copy =~ s/^((?:Join Filter|Index Cond|Recheck Cond|Hash Cond|Merge Cond|Filter|Group Key|Sort Key|Output|One-Time Filter):\s+)(.*)$/$2/u
896 0 1942 unless ref $x
897 639 1303 if $x->[0] =~ /\A (?: STRING_LITERAL | QUOTED_IDENTIFIER | IDENTIFIER ) \z/ux
903 138 33 unless $self->{$key}
907 2 55 if ($self->{'ctes'})
1059 28 29 if ($self->scan_on)
1065 2 55 if ($self->cte_order)
1075 45 12 if ($self->extra_info)
1078 3 88 if ($line =~ /^(Foreign File:\s+)(\S.*?)(\s*)$/u)
1082 40 48 unless ($line =~ s/^((?:Join Filter|Index Cond|Recheck Cond|Hash Cond|Merge Cond|Filter|Group Key|Sort Key|Output|One-Time Filter):\s+)(.*)$/$2/u)
1089 1942 0 if (ref $x) { }
1090 21 1921 if ($x->[0] eq 'STRING_LITERAL') { }
0 1921 elsif ($x->[0] eq 'QUOTED_IDENTIFIER') { }
618 1303 elsif ($x->[0] eq 'IDENTIFIER') { }
1113 138 33 unless $self->{$key}
1117 2 55 if ($self->{'ctes'})