Exemplo n.º 1
0
        protected internal virtual void logActivityResults(PerfTestPass pass, PerfTestRun run, HistoryService historyService)
        {
            string processInstanceId = run.getVariable(PerfTestConstants.PROCESS_INSTANCE_ID);
            IList <ActivityPerfTestResult> activityResults = new List <ActivityPerfTestResult>();

            HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
            DateTime startTime = processInstance.StartTime;

            IList <HistoricActivityInstance> activityInstances = historyService.createHistoricActivityInstanceQuery().processInstanceId(processInstanceId).orderByHistoricActivityInstanceStartTime().asc().list();

            foreach (HistoricActivityInstance activityInstance in activityInstances)
            {
                if (watchAllActivities || activityIds.Contains(activityInstance.ActivityId))
                {
                    ActivityPerfTestResult result = new ActivityPerfTestResult(activityInstance);
                    if (activityInstance.ActivityType.Equals("startEvent"))
                    {
                        result.StartTime = startTime;
                    }
                    activityResults.Add(result);
                }
            }

            pass.logActivityResult(processInstanceId, activityResults);
        }
Exemplo n.º 2
0
        public virtual void afterPass(PerfTestPass pass)
        {
            ProcessEngine  processEngine  = PerfTestProcessEngine.Instance;
            HistoryService historyService = processEngine.HistoryService;

            foreach (PerfTestRun run in pass.Runs.Values)
            {
                logActivityResults(pass, run, historyService);
            }
        }
Exemplo n.º 3
0
 public virtual void beforePass(PerfTestPass pass)
 {
     // nothing to do
 }
Exemplo n.º 4
0
 public virtual void afterPass(PerfTestPass pass)
 {
     // nothing to do
 }