Branch Coverage

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


line true false branch
64 301 1279 if 0 < scalar @_
82 1 2395 if $l =~ /\A \s* \( \d+ \s+ rows? \) \s* \z/msux
83 0 2395 if $l =~ /\A \s* query \s plan \s* \z/imsux
84 2 2393 if $l =~ /\A \s* (?: -+ | \x{2500}+ ) \s* \z/msux
86 18 2375 if ($l =~ / \A Trigger \s+ /msux) { }
167 2208 elsif ($l =~ / \A (?: Total \s+ runtime | Planning \s+ time | Execution \s+ time | Time | Filter | Output | JIT | Planning | Settings | Query \s+ Identifier ): /imsux) { }
231 1977 elsif ($l =~ /\A\S/u) { }
93 26 205 if (0 < scalar @out) { }
164 975 1392 if ($line =~ /\(/u and $line =~ / \A (?\s* -> \s* | \s* ) (?\S.*?) \s+ (?: $costs_re \s+ $analyze_re | $costs_re | $analyze_re ) \s* \z /msux) { }
29 1363 elsif ($line =~ / \A (\s*) InitPlan \s* ( \d+ )? \s* (?: \( returns \s+ (.*) \) \s* )? \z /msux) { }
28 1335 elsif ($line =~ / \A (\s*) SubPlan \s* (?: \d+ \s* )? \s* (?: \( returns .* \) \s* )? \z /msux) { }
23 1312 elsif ($line =~ / \A (\s*) CTE \s+ (\S+) \s* \z /msux) { }
178 1134 elsif ($line =~ / \A \s* (Planning|Execution) \s+ time: \s+ (\d+\.\d+) \s+ ms \s* \z /imsux) { }
52 1082 elsif ($line =~ / \A \s* Total \s+ runtime: \s+ (\d+\.\d+) \s+ ms \s* \z /imsux) { }
3 1079 elsif ($line =~ / \A \s* Settings: \s* ( $multiple_gucs ) \s* \z /imsux) { }
20 1059 elsif ($line =~ / \A \s* Trigger \s+ (.*) : \s+ time=(\d+\.\d+) \s+ calls=(\d+) \s* \z /imsux) { }
6 1053 elsif ($line =~ / \A (\s*) JIT: \s* \z /imsux) { }
11 1042 elsif ($line =~ / \A (\s*) Planning: \s* \z /imsux) { }
4 1038 elsif ($line =~ / \A \s* Query \s+ Text: \s+ ( .* ) \z /msux) { }
34 1004 elsif ($plan_started == 0) { }
999 5 elsif ($line =~ / \A (\s*) ( \S .* \S ) \s* \z /msux) { }
189 22 953 if (defined $+{'never_executed'})
201 301 674 if (0 == scalar keys %element_at_depth)
212 0 674 unless (defined $maximal_depth)
219 588 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 86 92 if "planning" eq lc $type
308 92 86 if "execution" eq lc $type
327 3 0 if 0 < scalar keys %{$settings;}
358 18 981 if ($in_jit)
363 5 976 unless defined $maximal_depth
365 0 976 unless $previous_element
367 16 960 if ($info =~ / \A Workers \s+ Launched: \s+ ( \d+ ) \z /imsux) { }
98 862 elsif ($info =~ / \A Buffers: \s /msux) { }
26 836 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 295 if defined $jit
400 34 267 if $query
401 11 290 if $planning_buffers