Branch Coverage

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


line true false branch
216 22 5720 if 0 < scalar @_
217 0 1454 if 0 < scalar @_
218 0 1274 if 0 < scalar @_
219 0 2965 if 0 < scalar @_
220 25 1041 if 0 < scalar @_
221 23 6837 if 0 < scalar @_
222 0 1435 if 0 < scalar @_
223 0 1601 if 0 < scalar @_
224 0 1435 if 0 < scalar @_
225 0 1435 if 0 < scalar @_
226 835 4459 if 0 < scalar @_
227 34 7312 if 0 < scalar @_
228 34 723 if 0 < scalar @_
229 22 728 if 0 < scalar @_
230 1038 99 if 0 < scalar @_
231 842 2216 if 0 < scalar @_
232 684 9738 if 0 < scalar @_
233 30 5973 if 0 < scalar @_
234 523 10875 if 0 < scalar @_
235 32 1387 if 0 < scalar @_
236 1355 1051 if 0 < scalar @_
237 206 1189 if 0 < scalar @_
238 76 326 if 0 < scalar @_
251 0 1580 if (0 == scalar @_)
254 0 1580 if (1 == scalar @_) { }
0 1580 elsif (1 == scalar(@_) % 2) { }
255 0 0 if ('HASH' eq ref $_[0]) { }
268 0 1580 unless defined $args{'type'}
272 4 6316 unless defined $args{$key}
277 323 1257 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 1236 elsif ($self->type =~ / \A ( Bitmap \s+ Index \s+ Scan) \s on \s (\S+) \z /msux) { }
132 1104 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 1075 elsif ($self->type =~ / \A ( CTE \s Scan ) \s on \s (\S+) (?: \s+ (\S+) ) ? \z /msux) { }
3 1072 elsif ($self->type =~ / \A ( WorkTable \s Scan ) \s on \s (\S+) (?: \s+ (\S+) ) ? \z /msux) { }
12 1060 elsif ($self->type =~ / \A ( Function \s Scan ) \s on \s (\S+) (?: \s+ (\S+) )? \z /msux) { }
3 1057 elsif ($self->type =~ / \A ( Subquery \s Scan ) \s on \s (.+) \z /msux) { }
286 181 142 if defined $3
300 70 62 if defined $4
305 12 17 if defined $3
310 3 0 if defined $3
315 11 1 if defined $3
337 1580 0 if (defined $explain)
358 603 835 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 250 684 if ($self->sub_nodes) { }
548 545 0 if defined $self->estimated_row_width
549 545 0 if defined $self->estimated_rows
550 545 0 if defined $self->estimated_startup_cost
551 545 0 if defined $self->estimated_total_cost
552 464 81 if defined $self->actual_loops
553 449 96 if defined $self->actual_rows
554 449 96 if defined $self->actual_time_first
555 449 96 if defined $self->actual_time_last
556 545 0 if defined $self->type
557 284 261 if defined $self->scan_on
558 241 304 if defined $self->extra_info
559 30 515 if defined $self->initplans_metainfo
563 236 309 if defined $self->sub_nodes
564 30 515 if defined $self->initplans
565 21 524 if defined $self->subplans
567 82 463 if $self->buffers
569 9 536 if defined $self->cte_order
570 9 536 if (defined $self->ctes)
588 4 610 unless defined $self->actual_time_last
589 0 610 unless defined $self->actual_loops
601 0 168 unless defined $self->actual_time_last
602 0 168 unless defined $self->actual_loops
603 167 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 1380 1886 if $self->sub_nodes
717 113 3153 if $self->initplans
718 60 3206 if $self->subplans
719 75 3191 if $self->ctes
752 2133 434 defined $self->actual_loops || $self->never_executed ? :
766 113 232 unless defined $prefix
768 232 113 if "" ne $prefix
774 168 177 if ($self->scan_on)
776 11 157 if ($S->{'cte_name'}) { }
5 152 elsif ($S->{'function_name'}) { }
52 100 elsif ($S->{'index_name'}) { }
1 99 elsif ($S->{'subquery_name'}) { }
4 95 elsif ($S->{'worktable_name'}) { }
778 7 4 if $S->{'cte_alias'}
782 5 0 if $S->{'function_alias'}
785 44 8 if ($S->{'table_name'}) { }
787 23 21 if $S->{'table_alias'}
798 4 0 if $S->{'worktable_alias'}
802 63 32 if $S->{'table_alias'}
806 294 51 if ($self->is_analyzed)
808 6 288 if ($self->never_executed) { }
280 8 elsif (defined $self->actual_time_last) { }
823 184 161 if ($self->extra_info)
827 111 234 if ($self->buffers)
833 9 336 if ($self->cte_order)
840 11 334 if ($self->initplans)
845 8 4 if ($meta) { }
855 168 177 if ($self->sub_nodes)
858 6 339 if ($self->subplans)
877 30 31 if ($self->scan_on)
881 2 59 if ($self->cte_order)
885 46 15 if ($self->extra_info)
888 3 90 if ($copy =~ /^Foreign File:\s+(\S.*?)\s*$/u)
892 41 49 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 1951 unless ref $x
897 642 1309 if $x->[0] =~ /\A (?: STRING_LITERAL | QUOTED_IDENTIFIER | IDENTIFIER ) \z/ux
903 148 35 unless $self->{$key}
907 2 59 if ($self->{'ctes'})
1059 30 31 if ($self->scan_on)
1065 2 59 if ($self->cte_order)
1075 46 15 if ($self->extra_info)
1078 3 90 if ($line =~ /^(Foreign File:\s+)(\S.*?)(\s*)$/u)
1082 41 49 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 1951 0 if (ref $x) { }
1090 21 1930 if ($x->[0] eq 'STRING_LITERAL') { }
0 1930 elsif ($x->[0] eq 'QUOTED_IDENTIFIER') { }
621 1309 elsif ($x->[0] eq 'IDENTIFIER') { }
1113 148 35 unless $self->{$key}
1117 2 59 if ($self->{'ctes'})