Branch Coverage

blib/lib/Pg/Explain/FromText.pm
Criterion Covered Total %
branch 98 110 89.0


line true false branch
64 299 1267 if 0 < scalar @_
82 1 2370 if $l =~ /\A \s* \( \d+ \s+ rows? \) \s* \z/msux
83 0 2370 if $l =~ /\A \s* query \s plan \s* \z/imsux
84 2 2368 if $l =~ /\A \s* (?: -+ | \x{2500}+ ) \s* \z/msux
86 18 2350 if ($l =~ / \A Trigger \s+ /msux) { }
163 2187 elsif ($l =~ / \A (?: Total \s+ runtime | Planning \s+ time | Execution \s+ time | Time | Filter | Output | JIT | Planning | Settings ): /imsux) { }
230 1957 elsif ($l =~ /\A\S/u) { }
93 25 205 if (0 < scalar @out) { }
164 968 1375 if ($line =~ /\(/u and $line =~ / \A (?\s* -> \s* | \s* ) (?\S.*?) \s+ (?: $costs_re \s+ $analyze_re | $costs_re | $analyze_re ) \s* \z /msux) { }
29 1346 elsif ($line =~ / \A (\s*) InitPlan \s* ( \d+ )? \s* (?: \( returns \s+ (.*) \) \s* )? \z /msux) { }
28 1318 elsif ($line =~ / \A (\s*) SubPlan \s* (?: \d+ \s* )? \s* (?: \( returns .* \) \s* )? \z /msux) { }
23 1295 elsif ($line =~ / \A (\s*) CTE \s+ (\S+) \s* \z /msux) { }
174 1121 elsif ($line =~ / \A \s* (Planning|Execution) \s+ time: \s+ (\d+\.\d+) \s+ ms \s* \z /imsux) { }
52 1069 elsif ($line =~ / \A \s* Total \s+ runtime: \s+ (\d+\.\d+) \s+ ms \s* \z /imsux) { }
2 1067 elsif ($line =~ / \A \s* Settings: \s* ( $multiple_gucs ) \s* \z /imsux) { }
20 1047 elsif ($line =~ / \A \s* Trigger \s+ (.*) : \s+ time=(\d+\.\d+) \s+ calls=(\d+) \s* \z /imsux) { }
6 1041 elsif ($line =~ / \A (\s*) JIT: \s* \z /imsux) { }
11 1030 elsif ($line =~ / \A (\s*) Planning: \s* \z /imsux) { }
4 1026 elsif ($line =~ / \A \s* Query \s+ Text: \s+ ( .* ) \z /msux) { }
34 992 elsif ($plan_started == 0) { }
987 5 elsif ($line =~ / \A (\s*) ( \S .* \S ) \s* \z /msux) { }
189 22 946 if (defined $+{'never_executed'})
201 299 669 if (0 == scalar keys %element_at_depth)
212 0 669 unless (defined $maximal_depth)
219 583 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 84 90 if "planning" eq lc $type
308 90 84 if "execution" eq lc $type
327 2 0 if 0 < scalar keys %{$settings;}
358 18 969 if ($in_jit)
363 4 965 unless defined $maximal_depth
365 0 965 unless $previous_element
367 16 949 if ($info =~ / \A Workers \s+ Launched: \s+ ( \d+ ) \z /imsux) { }
98 851 elsif ($info =~ / \A Buffers: \s /msux) { }
26 825 elsif ($info =~ m[ \A I/O \s Timings: \s ]msux) { }
374 11 87 if ($in_planning) { }
381 0 98 if $Pg::Explain::FromText::EVAL_ERROR
385 8 18 if ($in_planning) { }
386 8 0 if $planning_buffers
389 18 0 if $node->buffers
392 0 26 if $Pg::Explain::FromText::EVAL_ERROR
399 6 293 if defined $jit
400 34 265 if $query
401 11 288 if $planning_buffers