Search in sources :

Example 6 with Enactment

use of net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment in project processdash by dtuma.

the class PlanAnalysisPage method getSizeVsTime.

@//
Chart(//
id = "sizeVsTime", //
type = "xy", //
params = "units", titleKey = "Plan.Size_Vs_Time_FMT", format = "autoZero=none")
public ResultSet getSizeVsTime(ChartData chartData) {
    String units = chartData.chartArgs[0];
    ResultSet data = chartData.getEnactmentResultSet("Plan.Size_Scatter_Actual_FMT", "Plan.Time_Scatter_Actual");
    for (int row = data.numRows(); row > 0; row--) {
        Enactment e = (Enactment) data.getRowObj(row);
        data.setData(row, 1, num(e.actualSize(units)));
        data.setData(row, 2, num(e.actualTime() / 60));
    }
    return data;
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 7 with Enactment

use of net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment in project processdash by dtuma.

the class PlanAnalysisPage method getPlanVsActualSize.

@//
Chart(//
id = "planVsActualSize", //
type = "xy", //
params = "units", titleKey = "Plan.Size_Scatter_Title_FMT", format = "autoZero=none")
public ResultSet getPlanVsActualSize(ChartData chartData) {
    String units = chartData.chartArgs[0];
    ResultSet data = chartData.getEnactmentResultSet("Plan.Size_Scatter_Plan_FMT", "Plan.Size_Scatter_Actual_FMT");
    for (int row = data.numRows(); row > 0; row--) {
        Enactment e = (Enactment) data.getRowObj(row);
        double plan = chartData.histData.getSize(e, units, false);
        double actual = e.actualSize(units);
        data.setData(row, 1, num(plan));
        data.setData(row, 2, num(actual));
    }
    return data;
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 8 with Enactment

use of net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment in project processdash by dtuma.

the class DefectAnalysisPage method getTotalDefectDensity.

@//
Chart(//
id = "totalDefects", //
type = "line", titleKey = "Defects.Total_Title", format = "isDensity=t")
public ResultSet getTotalDefectDensity(ChartData chartData) {
    ResultSet data = chartData.getEnactmentResultSet(1);
    setDensityColumnHeader(data, chartData);
    for (int row = data.numRows(); row > 0; row--) {
        Enactment e = (Enactment) data.getRowObj(row);
        int total = e.actualDefects(TOTAL, true);
        int unknown = e.actualDefects(UNKNOWN, true);
        double denom = getDenom(chartData, e, Denom.Density, null);
        data.setData(row, 1, num((total + unknown) / denom));
    }
    return data;
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 9 with Enactment

use of net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment in project processdash by dtuma.

the class ProbeDatabaseUtil method buildResultSet.

private ProbeDatabaseResultSet buildResultSet(String[] columnHeaders, List<Enactment> enactmentList) {
    // retrieve the time-in-phase data for this workflow
    Map timeInPhase = histData.getTotalTimeInPhase();
    timeInPhase.remove(WorkflowHistDataHelper.TOTAL_PHASE_KEY);
    for (Map.Entry e : ((Map<String, Object>) timeInPhase).entrySet()) {
        DataPair d = (DataPair) e.getValue();
        e.setValue(d.actual);
    }
    // Create an empty result set to hold the data.
    int numRows = enactmentList.size();
    ProbeDatabaseResultSet result = new ProbeDatabaseResultSet(numRows, columnHeaders, workflowName, timeInPhase);
    // iterate over enactment info and store it into the result set.
    for (int i = numRows; i-- > 0; ) {
        Enactment e = enactmentList.get(i);
        int row = i + 1;
        // retrieve the dashboard path for this row and store in result
        result.setRowName(row, e.getProjectName() + "/" + e.getRootName());
        // retrieve the plan item ID for this row and store in result
        result.setData(row, ProbeData.IDENTIFIER, str(e.getRootID()));
        // store time and completion date data in the result.
        result.setData(row, ProbeData.EST_TIME, num(histData.getTime(e, null, false), 60));
        result.setData(row, ProbeData.ACT_TIME, num(e.actualTime(), 60));
        result.setData(row, ProbeData.COMPLETED_DATE, date(e.completed));
        // retrieve size data and store it into the result set
        String sizeUnits = require(getString("Size Units", false));
        result.setData(row, ProbeData.EST_OBJ_LOC, num(histData.getSize(e, sizeUnits, "Estimated Proxy"), 1));
        result.setData(row, ProbeData.EST_NC_LOC, num(histData.getSize(e, sizeUnits, false), 1));
        result.setData(row, ProbeData.ACT_NC_LOC, num(histData.getSize(e, sizeUnits, true), 1));
    }
    return result;
}
Also used : Entry(java.util.Map.Entry) Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) Map(java.util.Map) DataPair(net.sourceforge.processdash.util.DataPair)

Example 10 with Enactment

use of net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment in project processdash by dtuma.

the class DefectAnalysisPage method writeDefectsByPhase.

private static void writeDefectsByPhase(ChartData chartData, List<String> phases, boolean removed, Denom denomType, ResultSet data, int firstCol) {
    for (int col = phases.size(); col-- > 0; ) {
        String phase = phases.get(col);
        data.setColName(col + firstCol, phase);
        for (int row = data.numRows(); row > 0; row--) {
            Enactment e = (Enactment) data.getRowObj(row);
            int count = e.actualDefects(phase, removed);
            double denom = getDenom(chartData, e, denomType, phase);
            data.setData(row, col + firstCol, num(count / denom));
        }
    }
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment)

Aggregations

Enactment (net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment)18 ResultSet (net.sourceforge.processdash.data.util.ResultSet)11 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 DoubleData (net.sourceforge.processdash.data.DoubleData)1 DataPair (net.sourceforge.processdash.util.DataPair)1