示例#1
0
        public virtual PerfTestBuilder step(PerfTestStepBehavior behavior)
        {
            PerfTestStep step = new PerfTestStep(behavior);

            perfTest.addStep(step);
            return(this);
        }
示例#2
0
 public virtual void createRuns(PerfTestRunner runner, PerfTestStep firstStep, int numberOfRuns)
 {
     runs = new Dictionary <string, PerfTestRun>();
     for (int i = 0; i < numberOfRuns; i++)
     {
         string runId = idGenerator.NextId;
         runs[runId] = new PerfTestRun(runner, runId, firstStep);
     }
     runs = Collections.unmodifiableMap(runs);
 }
示例#3
0
 public virtual void addStep(PerfTestStep step)
 {
     if (steps.Count == 0)
     {
         // this is the first step
         steps.Add(step);
     }
     else
     {
         // link the step to the last step
         PerfTestStep lastStep = steps[steps.Count - 1];
         lastStep.NextStep = step;
         steps.Add(step);
     }
 }
示例#4
0
 /// <summary>
 /// log a step result. NOTE: this is expensive as it requires synchronization on the stepResultList.
 /// </summary>
 /// <param name="currentStep"> </param>
 /// <param name="stepResult"> </param>
 public virtual void logStepResult(PerfTestStep currentStep, object stepResult)
 {
     stepResults.Add(new PerfTestStepResult(currentStep.StepName, stepResult));
 }
示例#5
0
 public PerfTestRun(PerfTestRunner runner, string runId, PerfTestStep firstStep)
 {
     this.runner      = runner;
     this.currentStep = firstStep;
     setVariable(PerfTestConstants.RUN_ID, runId);
 }
示例#6
0
 public virtual void logStepResult(PerfTestStep currentStep, object stepResult)
 {
     result.logStepResult(currentStep, stepResult);
 }