Exemplo n.º 1
0
 protected internal override void processResults(PerfTestResults results, TabularResultSet tabularResultSet)
 {
     foreach (PerfTestResult passResult in results.PassResults)
     {
         tabularResultSet.Results.Add(processRow(passResult, results));
     }
 }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") protected void processResults(org.camunda.bpm.qa.performance.engine.framework.PerfTestResults results, TabularResultSet tabularResultSet)
        protected internal override void processResults(PerfTestResults results, TabularResultSet tabularResultSet)
        {
            List <object> row = new List <object>();

            row.Add(results.TestName);

            int insertCount = 0;
            int deleteCount = 0;
            int updateCount = 0;
            int selectCount = 0;

            if (results.PassResults.Count == 0)
            {
                return;
            }

            IList <PerfTestStepResult> stepResults = results.PassResults[0].StepResults;

            foreach (PerfTestStepResult stepResult in stepResults)
            {
                IList <LinkedHashMap <string, string> > statementLogs = (IList <LinkedHashMap <string, string> >)stepResult.ResultData;
                foreach (LinkedHashMap <string, string> statementLog in statementLogs)
                {
                    string           type          = statementLog.get("statementType");
                    SqlStatementType statementType = Enum.Parse(typeof(SqlStatementType), type);

                    switch (statementType)
                    {
                    case SqlStatementType.DELETE:
                        deleteCount++;
                        break;

                    case SqlStatementType.INSERT:
                        insertCount++;
                        break;

                    case SqlStatementType.UPDATE:
                        updateCount++;
                        break;

                    default:
                        selectCount++;
                        break;
                    }
                }
            }

            row.Add(insertCount);
            row.Add(deleteCount);
            row.Add(updateCount);
            row.Add(selectCount);

            tabularResultSet.addResultRow(row);
        }
Exemplo n.º 3
0
        protected internal override void processResults(PerfTestResults results, TabularResultSet tabularResultSet)
        {
            PerfTestConfiguration configuration   = results.Configuration;
            IList <string>        watchActivities = configuration.WatchActivities;

            foreach (PerfTestResult passResult in results.PassResults)
            {
                string           passTitle = getPassTitle(results.TestName, configuration, passResult);
                TabularResultSet result    = processPassResult(watchActivities, passResult);
                htmlBuilder.addSection(passTitle, result);
            }
        }
Exemplo n.º 4
0
        protected internal override void processResults(PerfTestResults results, TabularResultSet tabularResultSet)
        {
            IList <object> row = new List <object>();

            row.Add(results.TestName);

            foreach (PerfTestResult passResult in results.PassResults)
            {
                processRow(row, passResult, results);
            }

            tabularResultSet.Results.Add(row);
        }
Exemplo n.º 5
0
        protected internal virtual void processFile(File resultFile, TabularResultSet tabularResultSet)
        {
            PerfTestResults results = JsonUtil.readObjectFromFile(resultFile.AbsolutePath, typeof(PerfTestResults));

            processResults(results, tabularResultSet);
        }
Exemplo n.º 6
0
 protected internal abstract void processResults(PerfTestResults results, TabularResultSet tabularResultSet);
Exemplo n.º 7
0
        protected internal virtual void processRow(IList <object> row, PerfTestResult passResult, PerfTestResults results)
        {
            // add duration
            row.Add(passResult.Duration);

            // add throughput per second
            long  duration     = passResult.Duration;
            float numberOfRuns = results.Configuration.NumberOfRuns;
            float throughput   = (numberOfRuns / duration) * 1000;

            row.Add(throughput);

            // add speedup
            float durationForSequential = 0;

            foreach (PerfTestResult perfTestResult in results.PassResults)
            {
                if (perfTestResult.NumberOfThreads == 1)
                {
                    durationForSequential = perfTestResult.Duration;
                }
            }
            double  speedUp           = durationForSequential / passResult.Duration;
            decimal bigDecimalSpeedUp = new decimal(speedUp);

            bigDecimalSpeedUp.setScale(1, decimal.ROUND_HALF_UP);
            row.Add(bigDecimalSpeedUp.doubleValue());
        }
Exemplo n.º 8
0
        protected internal virtual IList <object> processRow(PerfTestResult passResult, PerfTestResults results)
        {
            IList <object>        row           = new List <object>();
            PerfTestConfiguration configuration = results.Configuration;

            // test name
            row.Add(results.TestName);

            // number of runs
            int numberOfRuns = configuration.NumberOfRuns;

            row.Add(numberOfRuns);

            // database
            row.Add(configuration.DatabaseName);

            // history level
            row.Add(configuration.HistoryLevel);

            // start time
            row.Add(configuration.StartTime);

            // platform
            row.Add(configuration.Platform);

            // number of threads
            row.Add(passResult.NumberOfThreads);

            // add duration
            long duration = passResult.Duration;

            row.Add(duration);

            // throughput
            float numberOfRunsFloat = numberOfRuns;
            float throughput        = (numberOfRunsFloat / duration) * 1000;

            row.Add(throughput);

            return(row);
        }