From 9a6e8d1c76afc4803a5b4ee7b4eb8cc676135a73 Mon Sep 17 00:00:00 2001 From: Heuzef Date: Fri, 20 Sep 2019 12:13:46 +0200 Subject: [PATCH] Adding math formule --- check_size_consistency.pl | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/check_size_consistency.pl b/check_size_consistency.pl index d25cbd3..164c724 100644 --- a/check_size_consistency.pl +++ b/check_size_consistency.pl @@ -172,16 +172,21 @@ print("\n----------------\n"); print("\n----------------\n"); # TOO SMALL ? -my $toosmall = "false"; -# $json->{new_size} > $json->{new_size_q3} + $json->{new_size_q3} - $json->{new_size_q1}) * 1.5 -# AND -# $json->{new_size} > $json->{new_size_avg} * 6 - +my $toosmall = "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 ) { + $toosmall = "false"; + } +else { + $toosmall = "true"; +} # TOO BIG ? -my $toobig = "false"; -# $json->{new_size} < $json->{new_size_q1} - $json->{new_size_q3} - $json->{new_size_q1}) * 1.5 -# AND -# $json->{new_size} < $json->{new_size_avg} / 3 +my $toobig = "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 ) { + $toobig = "false"; + } +else { + $toobig = "true"; +} print("Size Consistency : "); if ( $toosmall == "false" && $toobig == "false" ) {