Littel optimisation for LimitChecher...

This commit is contained in:
BrokenFire 2017-03-20 18:47:32 +01:00
parent 0ed95121d2
commit e92ce9f11f
2 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<Configuration status="error"> <Configuration status="error">
<Appenders> <Appenders>
<Console name="Console" target="SYSTEM_OUT"> <Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%highlight{[%d{HH:mm:ss.SSS}][%-5level]%logger{36}: %msg%n}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}" /> <PatternLayout pattern="%highlight{[%d{HH:mm:ss.SSS}][%-5level]%logger{2}: %msg%n}{FATAL=red blink, ERROR=red, WARN=bright yellow , INFO=blue, DEBUG=bright black, TRACE=cyan}" />
<!--{FATAL=red blink, ERROR=red, WARN=orange, INFO=yellow, DEBUG=green bold, TRACE=blue}--> <!--{FATAL=red blink, ERROR=red, WARN=orange, INFO=yellow, DEBUG=green bold, TRACE=blue}-->
</Console> </Console>
<!-- <!--

View File

@ -31,7 +31,7 @@ public class LimitChecker {
if(result!=404) if(result!=404)
number += 500; number += 500;
} }
number-=500; number-=400;
result = -1; result = -1;
logger.debug("First pass: "+number); logger.debug("First pass: "+number);
while(result != 404 ) while(result != 404 )
@ -45,7 +45,7 @@ public class LimitChecker {
if(result!=404) if(result!=404)
number += 100; number += 100;
} }
number-=100; number-=90;
result = -1; result = -1;
logger.debug("Second pass: "+number); logger.debug("Second pass: "+number);
while(result != 404 ) while(result != 404 )
@ -59,7 +59,7 @@ public class LimitChecker {
if(result!=404) if(result!=404)
number += 10; number += 10;
} }
number-=10; number-=9;
result = -1; result = -1;
logger.debug("Third pass: "+number); logger.debug("Third pass: "+number);
while(result != 404 ) while(result != 404 )