Search in sources :

Example 51 with ResultSet

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

the class DefectAnalysisPage method getDensityScatter.

@//
Chart(//
id = "remScatter", //
type = "xy", //
params = { "phaseX", "phaseY" }, titleKey = "Defects.Density_Scatter.Title_FMT", format = "isDensity=t")
public ResultSet getDensityScatter(ChartData chartData) {
    List<String> phases = Arrays.asList(chartData.chartArgs);
    ResultSet data = getDefectsByPhase(chartData, phases, true, Denom.Density);
    String densityStr = chartData.getDensityStr();
    data.setColName(1, resources.format("Defects.Density_Scatter.Axis_FMT", phases.get(0), densityStr));
    data.setColName(2, resources.format("Defects.Density_Scatter.Axis_FMT", phases.get(1), densityStr));
    return data;
}
Also used : ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 52 with ResultSet

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

the class DefectAnalysisPage method getDefectsByPhase.

private ResultSet getDefectsByPhase(ChartData chartData, List<String> phases, boolean removed, Denom denomType) {
    ResultSet data = chartData.getEnactmentResultSet(phases.size());
    writeDefectsByPhase(chartData, phases, removed, denomType, data, 1);
    return data;
}
Also used : ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 53 with ResultSet

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

the class DefectAnalysisPage method getSinglePhaseDefectDensity.

private ResultSet getSinglePhaseDefectDensity(ChartData chartData, boolean removed) {
    List<String> phase = Collections.singletonList(chartData.chartArgs[0]);
    ResultSet data = getDefectsByPhase(chartData, phase, removed, Denom.Density);
    setDensityColumnHeader(data, chartData);
    return data;
}
Also used : ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 54 with ResultSet

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

the class DefectAnalysisPage method getTotalDefectsByPhaseToDate.

private ResultSet getTotalDefectsByPhaseToDate(ChartData chartData, boolean removed) {
    Map<String, DataPair>[] raw = chartData.histData.getDefectsByPhase();
    Map<String, DataPair> counts = raw[removed ? WorkflowHistDataHelper.REM : WorkflowHistDataHelper.INJ];
    double total = counts.remove(TOTAL).actual;
    List<String> phases = new ArrayList<String>(counts.keySet());
    ResultSet data = new ResultSet(phases.size(), 2);
    data.setColName(0, getRes("Phase"));
    data.setColName(2, getRes("Percent_Units"));
    data.setFormat(2, "100%");
    for (int row = phases.size(); row > 0; row--) {
        String phase = (String) phases.get(row - 1);
        data.setRowName(row, phase);
        data.setData(row, 1, num(counts.get(phase).actual));
        data.setData(row, 2, num(counts.get(phase).actual / total));
    }
    return data;
}
Also used : ArrayList(java.util.ArrayList) ResultSet(net.sourceforge.processdash.data.util.ResultSet) Map(java.util.Map) DataPair(net.sourceforge.processdash.util.DataPair)

Example 55 with ResultSet

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

the class DefectAnalysisPage method getInjectedDefectsByPhase.

@//
Chart(//
id = "injByPhase", //
type = "area", //
titleKey = "Defects.Phase_Injected_Title", //
format = "stacked=pct\ncolorScheme=consistent\nconsistentSkip=1", smallFmt = "hideLegend=t")
public ResultSet getInjectedDefectsByPhase(ChartData chartData) {
    List<String> phases = chartData.getPhases();
    phases.add(0, Defect.BEFORE_DEVELOPMENT);
    ResultSet data = getDefectsByPhase(chartData, phases, false, Denom.None);
    data.setColName(1, resources.format("Workflow.Analysis.Before_FMT", phases.get(1)));
    return data;
}
Also used : ResultSet(net.sourceforge.processdash.data.util.ResultSet)

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