Branch Coverage

blib/lib/Pg/Explain/FromText.pm
Criterion Covered Total %
branch 98 112 87.5


line true false branch
64 319 1351 if 0 < scalar @_
82 1 2567 if $l =~ /\A \s* \( \d+ \s+ rows? \) \s* \z/msux
83 0 2567 if $l =~ /\A \s* query \s plan \s* \z/imsux
84 2 2565 if $l =~ /\A \s* (?: -+ | \x{2500}+ ) \s* \z/msux
86 18 2547 if ($l =~ / \A Trigger \s+ /msux) { }
173 2374 elsif ($l =~ / \A (?: Total \s+ runtime | Planning \s+ time | Execution \s+ time | Time | Filter | Output | JIT | Planning | Settings | Query \s+ Identifier ): /imsux) { }
233 2141 elsif ($l =~ /\A\S/u) { }
93 26 207 if (0 < scalar @out) { }
164 1002 1537 if ($line =~ /\(/u and $line =~ / \A (?\s* -> \s* | \s* ) (?\S.*?) \s+ (?: $costs_re \s+ $analyze_re | $costs_re | $analyze_re ) \s* \z /msux) { }
29 1508 elsif ($line =~ / \A (\s*) InitPlan \s* ( \d+ )? \s* (?: \( returns \s+ (.*) \) \s* )? \z /msux) { }
28 1480 elsif ($line =~ / \A (\s*) SubPlan \s* (?: \d+ \s* )? \s* (?: \( returns .* \) \s* )? \z /msux) { }
23 1457 elsif ($line =~ / \A (\s*) CTE \s+ (\S+) \s* \z /msux) { }
214 1243 elsif ($line =~ / \A \s* (Planning|Execution) \s+ time: \s+ (\d+\.\d+) \s+ ms \s* \z /imsux) { }
52 1191 elsif ($line =~ / \A \s* Total \s+ runtime: \s+ (\d+\.\d+) \s+ ms \s* \z /imsux) { }
3 1188 elsif ($line =~ / \A \s* Settings: \s* ( $multiple_gucs ) \s* \z /imsux) { }
20 1168 elsif ($line =~ / \A \s* Trigger \s+ (.*) : \s+ time=(\d+\.\d+) \s+ calls=(\d+) \s* \z /imsux) { }
9 1159 elsif ($line =~ / \A (\s*) JIT: \s* \z /imsux) { }
16 1143 elsif ($line =~ / \A (\s*) Planning: \s* \z /imsux) { }
4 1139 elsif ($line =~ / \A \s* Query \s+ Text: \s+ ( .* ) \z /msux) { }
35 1104 elsif ($plan_started == 0) { }
1099 5 elsif ($line =~ / \A (\s*) ( \S .* \S ) \s* \z /msux) { }
189 22 980 if (defined $+{'never_executed'})
201 319 683 if (0 == scalar keys %element_at_depth)
212 0 683 unless (defined $maximal_depth)
219 597 86 if ($previous_element->{'subelement-type'} eq 'subnode') { }
31 55 elsif ($previous_element->{'subelement-type'} eq 'initplan') { }
32 23 elsif ($previous_element->{'subelement-type'} eq 'subplan') { }
23 0 elsif ($previous_element->{'subelement-type'} =~ /^cte:(.+)$/u) { }
241 1 28 unless 0 == scalar @remove_elements
244 0 29 unless (defined $maximal_depth)
250 17 12 if defined $name
251 17 12 if defined $returns
252 12 17 if 0 == scalar keys %{$metainfo;}
267 16 12 unless 0 == scalar @remove_elements
270 0 28 unless (defined $maximal_depth)
287 6 17 unless 0 == scalar @remove_elements
290 0 23 unless (defined $maximal_depth)
307 104 110 if "planning" eq lc $type
308 110 104 if "execution" eq lc $type
327 3 0 if 0 < scalar keys %{$settings;}
358 27 1072 if ($in_jit)
363 5 1067 unless defined $maximal_depth
365 0 1067 unless $previous_element
367 17 1050 if ($info =~ / \A Workers \s+ Launched: \s+ ( \d+ ) \z /imsux) { }
127 923 elsif ($info =~ / \A Buffers: \s /msux) { }
45 878 elsif ($info =~ m[ \A I/O \s Timings: \s ]msux) { }
374 16 111 if ($in_planning) { }
381 0 127 if $Pg::Explain::FromText::EVAL_ERROR
385 11 34 if ($in_planning) { }
386 11 0 if $planning_buffers
389 34 0 if $node->buffers
392 0 45 if ($Pg::Explain::FromText::EVAL_ERROR)
394 0 0 if $Pg::Explain::FromText::EVAL_ERROR
402 9 310 if defined $jit
403 35 284 if $query
404 16 303 if $planning_buffers