inverse logique for toosmall and toobig

master
Heuzef 5 years ago
parent 7004a8f188
commit eef81b45df
  1. 18
      backuppc_check.pl

@ -149,25 +149,25 @@ print("Errors : $json->{errors}");
print("\n"); print("\n");
print("Size Consistency : "); print("Size Consistency : ");
# TOO SMALL ? # TOO BIG ?
my $toosmall = "true"; my $toobig = "true";
if ( $json->{new_size} > $json->{new_size_q3} + $json->{new_size_q3} - $json->{new_size_q1} * 1.5 && $json->{new_size} > $json->{new_size_avg} * 6 ) { if ( $json->{new_size} > $json->{new_size_q3} + $json->{new_size_q3} - $json->{new_size_q1} * 1.5 && $json->{new_size} > $json->{new_size_avg} * 6 ) {
$toosmall = "false"; $toobig = "false";
} }
else { else {
$toosmall = "true"; $toobig = "true";
} }
# TOO BIG ? # TOO SMALL ?
my $toobig = "true"; my $toosmall = "true";
if ( $json->{new_size} < $json->{new_size_q1} - $json->{new_size_q3} - $json->{new_size_q1} * 1.5 && $json->{new_size} < $json->{new_size_avg} / 3 ) { if ( $json->{new_size} < $json->{new_size_q1} - $json->{new_size_q3} - $json->{new_size_q1} * 1.5 && $json->{new_size} < $json->{new_size_avg} / 3 ) {
$toobig = "false"; $toosmall = "false";
} }
else { else {
$toobig = "true"; $toosmall = "true";
} }
# Print result # Print result
if ( $toosmall == "false" && $toobig == "false" ) { if ( $toobig == "false" && $toosmall == "false" ) {
print("Normal"); print("Normal");
} }
else { else {

Loading…
Cancel
Save