Esempio n. 1
0
        public virtual PerfTestResults run()
        {
            PerfTestRunner testRunner = new PerfTestRunner(perfTest, perfTestConfiguration);

            try
            {
                PerfTestResults results = testRunner.execute().get();
                resultRecorder.Results = results;
                return(results);
            }
            catch (ExecutionException e)
            {
                if (e.InnerException != null)
                {
                    Exception cause = e.InnerException;
                    if (cause is Exception)
                    {
                        throw (Exception)cause;
                    }
                    else
                    {
                        throw new PerfTestException(cause);
                    }
                }
                else
                {
                    throw new PerfTestException(e);
                }
            }
            catch (Exception e)
            {
                throw new PerfTestException(e);
            }
        }
Esempio n. 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);
 }
Esempio n. 3
0
 public PerfTestRun(PerfTestRunner runner, string runId, PerfTestStep firstStep)
 {
     this.runner      = runner;
     this.currentStep = firstStep;
     setVariable(PerfTestConstants.RUN_ID, runId);
 }