Branch Coverage

File:script/bi-alert
Coverage:77.0%

line%coveragebranch
9350TFunless (&GetOptions("analysis|a=s\@", \$opt_analysis, "threshold|t=s\@", \$opt_thresholds, "suppress|s=s", \$opt_suppress, "state-file=s", \$opt_state_file, "recovery|r", \$opt_recovery, "notify-cmd=s", \$opt_notify, "model-dir|m=s", \$opt_model_dir, "data-dir|d=s", \$opt_data_dir, "dry-run|n", \$opt_dry_run, "help|h", \$opt_help))
95100TFif ($opt_help)
10350TFdefined $given ? :
10650TFunless length $id
107100TFunless $listed{$id}++
110100TFunless (@analysis_ids)
118100TFif (defined $opt_notify)
121100TFunless (length $notify_cmd)
134100TFif defined $notify_cmd
142100TFif (defined $opt_suppress and length $opt_suppress)
144100TFunless (defined $suppress)
16150TFunless (-f $analyses_path)
16750TFunless (defined $analyses_json)
17350TFif ($@ or not $analyses)
189100TFunless (defined $a)
19550TFunless (@datasets)
20150TFunless ($spec =~ /\A(?:table|path):/)
208100TFif ($spec =~ /\Atable:(.+)\z/) { }
50TFelsif ($spec =~ /\Apath:(.+)\z/) { }
21050TFif $table =~ m[\A([^/]+)/(.+)\z]
21350TFif (-f $p)
22150TFunless (defined $file_path and -f $file_path)
23450TFdefined $internal ? :
24050TFif ($@)
24250TFunless (eval {         do {         require Text::CSV_XS } })
24350TF$INC{'Text/CSV_XS.pm'} ? :
24650TFunless open my $fh, "<:utf8", $file_path
25650TFif ($@)
29050TFdefined $given ? :
29350TFunless length $text
300100TFif ($text =~ /\A([^:]+):([^:]+):([^:]+):(.+)\z/ and $analyses->{$1}) { }
100TFelsif ($text =~ /\A([^:]+):([^:]+):(.+)\z/) { }
302100TFunless ($by_id{$owner})
31650TFunless (exists $ops{$op})
322100TFunless (defined $group->{'results'}{$alias})
330100TFif $seen_check{$pair}++
342100TFdefined $ENV{'BI_ALERT_NOW'} && $ENV{'BI_ALERT_NOW'} =~ /\A\d+\z/ ? :
349100TF$in_use ? :
355100TF$multi ? :
35950TFif (%{$group->{'results'};}) { }
36250TFdefined $group->{'results'}{$k} ? :
378100TFif $outcome->{'changed'}
388100TFif (defined $notify_cmd and @announced)
389100TFif ($opt_dry_run) { }
396100TF@crossings ? :
398100TF@crossings == 1 ? :
100TFif @crossings
40050TF@recoveries == 1 ? :
100TFif @recoveries
402100TF@announced == 1 ? :
403100TFunless deliver($notify_cmd, $event, $subject)
412100TFif $changed and $in_use and not $opt_dry_run and not $delivery_failed
425100TF@recoveries ? :
100TF@crossings ? :
53850TFif $buffering
53950TFunless open my $fh, ">", \$message
551100TFunless $buffering
582100TFif $ok
58350TFif ($problem =~ /\Athe delivery command failed (\(.*\))\z/) { }
597100TFif defined $problem
60550TFunless $ok