Search in sources :

Example 56 with ResultSet

use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.

the class DefectAnalysisPage method getPhaseInjectionRates.

@//
Chart(//
id = "injRates", //
type = "line", //
titleKey = "Defects.Injection_Rate.Title", format = "noSkipLegend=t\nunits=${Defects.Injection_Rate.Units}\n" + "headerComment=${Defects.Injection_Rate.Units}")
public ResultSet getPhaseInjectionRates(ChartData chartData) {
    List<String> phases = chartData.getPhases(PhaseType.Construction);
    if (phases.isEmpty())
        return null;
    Collections.reverse(phases);
    ResultSet data = getDefectsByPhase(chartData, phases, false, Denom.Rate);
    return data;
}
Also used : ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 57 with ResultSet

use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.

the class DefectAnalysisPage method getDefectRemovalLeverage.

@//
Chart(//
id = "drl", //
type = "line", //
titleKey = "Defects.Leverage.Title", format = "headerComment=${Defects.Leverage.Comment_FMT}")
public ResultSet getDefectRemovalLeverage(ChartData chartData) {
    ResultSet data = getPhaseRemovalRates(chartData);
    if (data == null || data.numCols() < 2)
        return null;
    for (int row = data.numRows(); row > 0; row--) {
        double denom = ((DoubleData) data.getData(row, 1)).getDouble();
        for (int col = data.numCols(); col > 1; col--) {
            double val = ((DoubleData) data.getData(row, col)).getDouble();
            double drl = val / denom;
            data.setData(row, col, num(drl));
        }
        data.setData(row, 1, num(1));
    }
    // store the name of the last workflow phase in the args, so it can
    // be used in the construction of chart headers/labels
    chartData.chartArgs = new String[] { data.getColName(1) };
    return data;
}
Also used : ResultSet(net.sourceforge.processdash.data.util.ResultSet) DoubleData(net.sourceforge.processdash.data.DoubleData)

Aggregations

ResultSet (net.sourceforge.processdash.data.util.ResultSet)57 Enactment (net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment)11 DoubleData (net.sourceforge.processdash.data.DoubleData)5 ArrayList (java.util.ArrayList)4 ListData (net.sourceforge.processdash.data.ListData)3 DataPair (net.sourceforge.processdash.util.DataPair)3 Iterator (java.util.Iterator)2 List (java.util.List)2 Map (java.util.Map)2 PDashQuery (net.sourceforge.processdash.api.PDashQuery)2 PhaseType (net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.PhaseType)2 IOException (java.io.IOException)1 Calendar (java.util.Calendar)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 ServletException (javax.servlet.ServletException)1 DataContext (net.sourceforge.processdash.data.DataContext)1 StringData (net.sourceforge.processdash.data.StringData)1