Esempio n. 1
0
 public CrawlRuleTester(int crawlDepth, long crawlDelay, String baseUrl, ArchivalUnit au) {
   super("crawlrule tester");
   m_crawlDepth = crawlDepth;
   long minFetchDelay =
       CurrentConfig.getLongParam(
           BaseArchivalUnit.PARAM_MIN_FETCH_DELAY, BaseArchivalUnit.DEFAULT_MIN_FETCH_DELAY);
   m_crawlDelay = Math.max(crawlDelay, minFetchDelay);
   m_baseUrl = baseUrl;
   m_au = au;
 }
 long sleepTimeToAchieveLoad(long runDuration, float maxLoad) {
   return Math.round(((double) runDuration / maxLoad) - runDuration);
 }