Example #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);
        }
 /// <summary>
 /// Adds the elements of an array to the end of this PerfTestRunCollection.
 /// </summary>
 /// <param name="items">
 /// The array whose elements are to be added to the end of this PerfTestRunCollection.
 /// </param>
 public virtual void AddRange(PerfTestRun[] items)
 {
     foreach (PerfTestRun item in items)
     {
         this.List.Add(item);
     }
 }
Example #3
0
 public virtual void afterRun(PerfTest test, PerfTestRun run)
 {
     // nothing to do
 }
Example #4
0
 public virtual void afterStep(PerfTestStep step, PerfTestRun run)
 {
     // nothing to do
 }
Example #5
0
 public virtual void beforeStep(PerfTestStep step, PerfTestRun run)
 {
     // nothing to do
 }
Example #6
0
 public virtual void beforeRun(PerfTest test, PerfTestRun run)
 {
     // nothing to do
 }
 /// <summary>
 /// Adds an instance of type PerfTestRun to the end of this PerfTestRunCollection.
 /// </summary>
 /// <param name="value">
 /// The PerfTestRun to be added to the end of this PerfTestRunCollection.
 /// </param>
 public virtual void Add(PerfTestRun value)
 {
     this.List.Add(value);
 }
 /// <summary>
 /// Removes the first occurrence of a specific PerfTestRun from this PerfTestRunCollection.
 /// </summary>
 /// <param name="value">
 /// The PerfTestRun value to remove from this PerfTestRunCollection.
 /// </param>
 public virtual void Remove(PerfTestRun value)
 {
     this.List.Remove(value);
 }
 /// <summary>
 /// Initializes a new instance of the PerfTestRunCollection class, containing elements
 /// copied from an array.
 /// </summary>
 /// <param name="items">
 /// The array whose elements are to be added to the new PerfTestRunCollection.
 /// </param>
 public PerfTestRunCollection(PerfTestRun[] items)
 {
     this.AddRange(items);
 }
Example #10
0
 /// <summary>
 /// Inserts an element into the PerfTestRunCollection at the specified index
 /// </summary>
 /// <param name="index">
 /// The index at which the PerfTestRun is to be inserted.
 /// </param>
 /// <param name="value">
 /// The PerfTestRun to insert.
 /// </param>
 public virtual void Insert(int index, PerfTestRun value)
 {
     this.List.Insert(index, value);
 }
Example #11
0
 /// <summary>
 /// Return the zero-based index of the first occurrence of a specific value
 /// in this PerfTestRunCollection
 /// </summary>
 /// <param name="value">
 /// The PerfTestRun value to locate in the PerfTestRunCollection.
 /// </param>
 /// <returns>
 /// The zero-based index of the first occurrence of the _ELEMENT value if found;
 /// -1 otherwise.
 /// </returns>
 public virtual int IndexOf(PerfTestRun value)
 {
     return this.List.IndexOf(value);
 }
Example #12
0
 /// <summary>
 /// Determines whether a specfic PerfTestRun value is in this PerfTestRunCollection.
 /// </summary>
 /// <param name="value">
 /// The PerfTestRun value to locate in this PerfTestRunCollection.
 /// </param>
 /// <returns>
 /// true if value is found in this PerfTestRunCollection;
 /// false otherwise.
 /// </returns>
 public virtual bool Contains(PerfTestRun value)
 {
     return this.List.Contains(value);
 }
Example #13
0
        public virtual void afterStep(PerfTestStep step, PerfTestRun run)
        {
            IList <SqlStatementLog> loggedStatements = StatementLogSqlSession.stopLogging();

            run.logStepResult(loggedStatements);
        }
Example #14
0
 public virtual void beforeStep(PerfTestStep step, PerfTestRun run)
 {
     StatementLogSqlSession.startLogging();
 }