explicit usage of --time-sec will implicitly turn off auto-adjustment of time delay

This commit is contained in:
Miroslav Stampar 2011-04-15 08:52:53 +00:00
parent aed994192e
commit 8c6f7c7d5f
2 changed files with 5 additions and 1 deletions

View File

@ -1826,7 +1826,7 @@ def wasLastRequestDelayed():
lowerStdLimit = average(kb.responseTimes) + TIME_STDEV_COEFF * deviation
retVal = (threadData.lastQueryDuration >= lowerStdLimit)
if not kb.testMode and retVal and conf.timeSec == TIME_DEFAULT_DELAY:
if not kb.testMode and retVal and kb.adjustTimeDelay:
adjustTimeDelay(threadData.lastQueryDuration, lowerStdLimit)
return retVal

View File

@ -89,6 +89,7 @@ from lib.core.settings import MAXDB_ALIASES
from lib.core.settings import SYBASE_ALIASES
from lib.core.settings import BURP_SPLITTER
from lib.core.settings import MAX_NUMBER_OF_THREADS
from lib.core.settings import TIME_DEFAULT_DELAY
from lib.core.settings import TIME_DELAY_CANDIDATES
from lib.core.settings import UNKNOWN_DBMS_VERSION
from lib.core.settings import WEBSCARAB_SPLITTER
@ -1196,6 +1197,8 @@ def __cleanupOptions():
if conf.data:
conf.data = urldecode(conf.data)
kb.adjustTimeDelay = (conf.timeSec == TIME_DEFAULT_DELAY)
def __setConfAttributes():
"""
This function set some needed attributes into the configuration
@ -1237,6 +1240,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
logger.debug(debugMsg)
kb.absFilePaths = set()
kb.adjustTimeDelay = False
kb.authHeader = None
kb.bannerFp = advancedDict()