+ Display responde code and response message in case of failure

+ Take into account null timestamps
This commit is contained in:
Sébastien Prud'homme 2017-04-12 14:36:20 +02:00
parent b9478ec686
commit 0e56822223
1 changed files with 6 additions and 4 deletions

View File

@ -150,18 +150,20 @@ sub run {
$stepOk++;
} else {
if (!defined($first_failed_label)) {
$first_failed_label = $label;
$first_failed_label = $label . " (" . $response_code . " " . $response_message . ")";
}
$exit1 = $self->{output}->get_most_critical(status => [ $exit1, $temp_exit ]);
}
if ($timestamp > 0) {
if ($timing0 == 0) {
$timing0 = $timestamp;
}
$timing1 = $timestamp + $elapsed_time;
}
}
my $timeelapsed = ($timing1 - $timing0) / 1000;
my $availability = sprintf("%d", $stepOk * 100 / $step);