Branch Coverage

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


line true false branch
216 22 5481 if 0 < scalar @_
217 0 1377 if 0 < scalar @_
218 0 1199 if 0 < scalar @_
219 0 2826 if 0 < scalar @_
220 25 954 if 0 < scalar @_
221 23 6555 if 0 < scalar @_
222 0 1360 if 0 < scalar @_
223 0 1526 if 0 < scalar @_
224 0 1360 if 0 < scalar @_
225 0 1360 if 0 < scalar @_
226 794 4204 if 0 < scalar @_
227 34 6967 if 0 < scalar @_
228 34 717 if 0 < scalar @_
229 22 665 if 0 < scalar @_
230 1000 99 if 0 < scalar @_
231 808 2069 if 0 < scalar @_
232 649 9277 if 0 < scalar @_
233 30 5697 if 0 < scalar @_
234 501 10419 if 0 < scalar @_
235 22 1308 if 0 < scalar @_
236 1286 1050 if 0 < scalar @_
237 147 1019 if 0 < scalar @_
238 76 326 if 0 < scalar @_
251 0 1511 if (0 == scalar @_)
254 0 1511 if (1 == scalar @_) { }
0 1511 elsif (1 == scalar(@_) % 2) { }
255 0 0 if ('HASH' eq ref $_[0]) { }
268 0 1511 unless defined $args{'type'}
272 4 6040 unless defined $args{$key}
277 314 1197 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 1176 elsif ($self->type =~ / \A ( Bitmap \s+ Index \s+ Scan) \s on \s (\S+) \z /msux) { }
120 1056 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 1027 elsif ($self->type =~ / \A ( CTE \s Scan ) \s on \s (\S+) (?: \s+ (\S+) ) ? \z /msux) { }
3 1024 elsif ($self->type =~ / \A ( WorkTable \s Scan ) \s on \s (\S+) (?: \s+ (\S+) ) ? \z /msux) { }
11 1013 elsif ($self->type =~ / \A ( Function \s Scan ) \s on \s (\S+) (?: \s+ (\S+) )? \z /msux) { }
3 1010 elsif ($self->type =~ / \A ( Subquery \s Scan ) \s on \s (.+) \z /msux) { }
286 178 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 1511 0 if (defined $explain)
358 567 794 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 247 649 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 1310 1818 if $self->sub_nodes
717 113 3015 if $self->initplans
718 60 3068 if $self->subplans
719 75 3053 if $self->ctes
752 1971 434 defined $self->actual_loops || $self->never_executed ? :
766 89 193 unless defined $prefix
768 193 89 if "" ne $prefix
774 140 142 if ($self->scan_on)
776 11 129 if ($S->{'cte_name'}) { }
3 126 elsif ($S->{'function_name'}) { }
42 84 elsif ($S->{'index_name'}) { }
1 83 elsif ($S->{'subquery_name'}) { }
4 79 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 50 29 if $S->{'table_alias'}
806 231 51 if ($self->is_analyzed)
808 6 225 if ($self->never_executed) { }
217 8 elsif (defined $self->actual_time_last) { }
823 151 131 if ($self->extra_info)
827 62 220 if ($self->buffers)
833 9 273 if ($self->cte_order)
840 11 271 if ($self->initplans)
845 8 4 if ($meta) { }
855 133 149 if ($self->sub_nodes)
858 6 276 if ($self->subplans)
877 26 26 if ($self->scan_on)
881 2 50 if ($self->cte_order)
885 40 12 if ($self->extra_info)
888 3 80 if ($copy =~ /^Foreign File:\s+(\S.*?)\s*$/u)
892 36 44 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 1867 unless ref $x
897 621 1246 if $x->[0] =~ /\A (?: STRING_LITERAL | QUOTED_IDENTIFIER | IDENTIFIER ) \z/ux
903 126 30 unless $self->{$key}
907 2 50 if ($self->{'ctes'})
1059 26 26 if ($self->scan_on)
1065 2 50 if ($self->cte_order)
1075 40 12 if ($self->extra_info)
1078 3 80 if ($line =~ /^(Foreign File:\s+)(\S.*?)(\s*)$/u)
1082 36 44 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 1867 0 if (ref $x) { }
1090 17 1850 if ($x->[0] eq 'STRING_LITERAL') { }
0 1850 elsif ($x->[0] eq 'QUOTED_IDENTIFIER') { }
604 1246 elsif ($x->[0] eq 'IDENTIFIER') { }
1113 126 30 unless $self->{$key}
1117 2 50 if ($self->{'ctes'})