Пример #1
0
        public crawlerDomainTaskMachine(modelSpiderTestRecord __tRecord, List <webSiteProfile> sample, directAnalyticReporter __reporter, folderNode __folder)
        {
            reporter = __reporter;
            folder   = __folder;
            tRecord  = __tRecord;


            logger = new builderForLog();
            aceLog.consoleControl.setAsOutput(logger, tRecord.name);

            SetWebLoaderControler(__folder);


            items = new crawlerDomainTaskCollection(tRecord, sample, this);

            cpuTaker      = new performanceCpu(tRecord.name);
            dataLoadTaker = new performanceDataLoad(tRecord.name);
            measureTaker  = new performanceResources(tRecord.name, this);

            cpuTaker.take();
            dataLoadTaker.take();
            measureTaker.take();

            tRecord.cpuTaker      = cpuTaker;
            tRecord.dataLoadTaker = dataLoadTaker;
            tRecord.measureTaker  = measureTaker;

            plugins       = new enginePlugInCollection(this);
            reportPlugins = new reportingPlugInCollection(reporter, this);
        }
Пример #2
0
        /// <summary>
        /// Cration of wRecords
        /// </summary>
        /// <param name="__wProfile">The w profile.</param>
        /// <param name="__parent">The parent.</param>
        protected void initialization(webSiteProfile __wProfile, crawlerDomainTaskCollection __parent)
        {
            try
            {
                parent   = __parent;
                wProfile = __wProfile;

                aRecord = parent.tRecord.aRecord;
                // crawler = aRecord.sciProject.mainWebCrawler;


                tRecord = parent.tRecord;

                // crawlerContext = aRecord.crawledContextGlobalRegister.GetContext(wProfile.domain, tRecord.instance.settings.legacySettings, wProfile, aRecord.testRunStamp);

                //   tGeneralRecord = aRecord.tGeneralRecord;



                //  aRecord.tGeneralRecord.startChildRecord(wProfile, wProfile.url);
                //  wGeneralRecord = aRecord.tGeneralRecord.childRecord; // aRecord.tGeneralRecord.children.GetRecord(crawlerContext, true);


                evaluator = tRecord.instance.Clone(tRecord.logBuilder);

                stageControl = tRecord.stageControl;

                if (stageControl == null)
                {
                    stageControl = new macroStageControlDeclareKeyPages("Default", "CrawlerDomainTask");
                    stageControl.stage.stageIterationLimit = evaluator.settings.limitIterations;
                }
                //stageControl = parent.aMacro.helpMethodBuildStageControl(aRecord, tRecord);

                web = new spiderWeb();

                evaluator.setStartPage(wProfile.url, web);

                tRecord.startChildRecord(web, wProfile.url);
                wRecord = tRecord.childRecord;
                wRecord.wGeneralRecord = wGeneralRecord;
                wRecord.frontierDLC    = new frontierRankingAlgorithmDLCRecord(wRecord);
                wRecord.spiderReal     = evaluator;
                wRecord.spiderDLCTask  = this;
                //wRecord.siteProfile = __wProfile;

                evaluator.plugins.eventDLCInitiated(evaluator as spiderEvaluatorBase, this, wRecord);

                //  TimeLimitForOneItemLoad = parent.TimeLimitForOneItemLoad;
            }
            catch (Exception ex)
            {
                status = crawlerDomainTaskStatusEnum.aborted;
                var clog = crawlerErrorLog.CreateAndSave(ex, wRecord, this, crawlerErrorEnum.jobTaskInitiationError);
            }
        }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="crawlerDomainTaskMachine"/> class.
 /// </summary>
 /// <param name="tRecord">The t record.</param>
 /// <param name="sample">The sample.</param>
 /// <param name="macro">The macro.</param>
 public crawlerDomainTaskMachine(modelSpiderTestRecord tRecord, List <webSiteProfile> sample, analyticMacroBase macro)
 {
     items = new crawlerDomainTaskCollection(tRecord, sample, macro);
     // maxThreads = imbWEMManager.settings.crawlerDomainThreadCountAllowed;
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="crawlerDomainTask"/> class.
 /// </summary>
 /// <param name="__wProfile">The w profile.</param>
 /// <param name="__parent">The parent.</param>
 public crawlerDomainTask(webSiteProfile __wProfile, crawlerDomainTaskCollection __parent)
 {
     initialization(__wProfile, __parent);
 }