@ JavaScriptMethod public JSONObject getGraphData ( ) { JSONObject projectDataSet = new JSONObject ( ) ; if ( _projectResult == null ) { // getUpdatedData(); return new JSONObject ( ) ; } for ( SortedMap . Entry < String , LrProjectScenarioResults > scenarioResults : _projectResult . getScenarioResults ( ) . entrySet ( ) ) { JSONObject scenarioData = new JSONObject ( ) ; JSONObject scenarioStats = new JSONObject ( ) ; // LrGraphUtils // .constructVuserSummary(scenarioResults.getValue().getvUserSummary(), scenarioStats, _workedBuilds // .size()); // LrGraphUtils.constructDurationSummary(scenarioResults.getValue().getDurationData(), scenarioStats); // LrGraphUtils.constructConnectionSummary(scenarioResults.getValue().getMaxConnectionsCount(), scenarioStats); // LrGraphUtils.constructTransactionSummary(scenarioResults.getValue().getTransactionSum(), scenarioStats, // _workedBuilds.size()); scenarioData . put ( "scenarioStats" , scenarioStats ) ; JSONObject scenarioGraphData = new JSONObject ( ) ; //Scenario data graphs // LrGraphUtils.constructVuserGraph(scenarioResults, scenarioGraphData); // LrGraphUtils.constructConnectionsGraph(scenarioResults, scenarioGraphData); //Scenario SLA graphs LrGraphUtils . constructTotalHitsGraph ( scenarioResults , scenarioGraphData ) ; LrGraphUtils . constructAvgHitsGraph ( scenarioResults , scenarioGraphData ) ; LrGraphUtils . constructTotalThroughputGraph ( scenarioResults , scenarioGraphData ) ; LrGraphUtils . constructAverageThroughput ( scenarioResults , scenarioGraphData ) ; LrGraphUtils . constructErrorGraph ( scenarioResults , scenarioGraphData ) ; LrGraphUtils . constructAvgTransactionGraph ( scenarioResults , scenarioGraphData ) ; LrGraphUtils . constructPercentileTransactionGraph ( scenarioResults , scenarioGraphData ) ; scenarioData . put ( "scenarioData" , scenarioGraphData ) ; String scenarioName = scenarioResults . getKey ( ) ; projectDataSet . put ( scenarioName , scenarioData ) ; } return projectDataSet ; }
Collates graph data per scenario per build for the whole project . Adds the respected graphs with scenario as the key