public synchronized void getUpdatedData ( ) { if ( ! isUpdateDataNeeded ( ) ) { return ; } this . _projectResult = new ProjectLrResults ( ) ; _workedBuilds = new ArrayList < Integer > ( ) ; RunList < ? extends Run > projectBuilds = currentProject . getBuilds ( ) ; // updateLastBuild(); for ( Run run : projectBuilds ) { PerformanceJobReportAction performanceJobReportAction = run . getAction ( PerformanceJobReportAction . class ) ; if ( performanceJobReportAction == null ) { continue ; } if ( run . isBuilding ( ) ) { continue ; } int runNumber = run . getNumber ( ) ; if ( _workedBuilds . contains ( runNumber ) ) { continue ; } _workedBuilds . add ( runNumber ) ; LrJobResults jobLrResult = performanceJobReportAction . getLrResultBuildDataset ( ) ; // get all the ran scenario results from this run and insert them into the project for ( Map . Entry < String , JobLrScenarioResult > runResult : jobLrResult . getLrScenarioResults ( ) . entrySet ( ) ) { // add the scenario if it's the first time it's ran in this build (allows scenarios to be also added // at diffrent time) if ( ! _projectResult . getScenarioResults ( ) . containsKey ( runResult . getKey ( ) ) ) { _projectResult . addScenario ( new LrProjectScenarioResults ( runResult . getKey ( ) ) ) ; } // Join the SLA rule results LrProjectScenarioResults lrProjectScenarioResults = _projectResult . getScenarioResults ( ) . get ( runResult . getKey ( ) ) ; if ( lrProjectScenarioResults . getBuildCount ( ) > MAX_DISPLAY_BUILDS ) { continue ; } lrProjectScenarioResults . incBuildCount ( ) ; JobLrScenarioResult scenarioRunResult = runResult . getValue ( ) ; for ( GoalResult goalResult : scenarioRunResult . scenarioSlaResults ) { scenarioGoalResult ( runNumber , lrProjectScenarioResults , goalResult ) ; } // Join sceanrio stats joinSceanrioConnectionsStats ( runNumber , lrProjectScenarioResults , scenarioRunResult ) ; joinVUserScenarioStats ( runNumber , lrProjectScenarioResults , scenarioRunResult ) ; joinTransactionScenarioStats ( runNumber , lrProjectScenarioResults , scenarioRunResult ) ; joinDurationStats ( runNumber , lrProjectScenarioResults , scenarioRunResult ) ; } } }
Gets updated data .