Search in sources :

Example 26 with ResultSet

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

the class PlanAnalysisPage method getTimeEstimatingError.

@//
Chart(//
id = "timeEstErr", //
type = "line", titleKey = "Plan.Time_Estimating_Error_Title")
public ResultSet getTimeEstimatingError(ChartData chartData) {
    ResultSet data = chartData.getEnactmentResultSet("Plan.Percent_Error");
    for (int row = data.numRows(); row > 0; row--) {
        Enactment e = (Enactment) data.getRowObj(row);
        double plan = chartData.histData.getTime(e, null, false);
        double actual = e.actualTime();
        double err = (actual - plan) / plan;
        data.setData(row, 1, num(err));
    }
    data.setFormat(1, "100%");
    return data;
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 27 with ResultSet

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

the class PlanAnalysisPage method getPlanVsActualTime.

@//
Chart(//
id = "planVsActualTime", //
type = "xy", titleKey = "Plan.Time_Scatter_Title", format = "autoZero=none")
public ResultSet getPlanVsActualTime(ChartData chartData) {
    ResultSet data = chartData.getEnactmentResultSet("Plan.Time_Scatter_Plan", "Plan.Time_Scatter_Actual");
    for (int row = data.numRows(); row > 0; row--) {
        Enactment e = (Enactment) data.getRowObj(row);
        double plan = chartData.histData.getTime(e, null, false);
        double actual = e.actualTime();
        data.setData(row, 1, num(plan / 60));
        data.setData(row, 2, num(actual / 60));
    }
    return data;
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 28 with ResultSet

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

the class PlanAnalysisPage method getSizeEstimatingError.

@//
Chart(//
id = "sizeEstErr", //
type = "line", //
params = "units", titleKey = "Plan.Size_Estimating_Error_Title_FMT")
public ResultSet getSizeEstimatingError(ChartData chartData) {
    String units = chartData.chartArgs[0];
    ResultSet data = chartData.getEnactmentResultSet("Plan.Percent_Error");
    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);
        double err = (actual - plan) / plan;
        data.setData(row, 1, num(err));
    }
    data.setFormat(1, "100%");
    return data;
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 29 with ResultSet

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

the class WorkflowPlanSummary method writePhaseChart.

private void writePhaseChart(boolean plan, String titleRes, String columnRes, double factor, Map<String, DataPair> phaseData) throws IOException {
    int numRows = phaseData.size() - 1;
    ResultSet data = new ResultSet(numRows, 1);
    int row = 0;
    for (Entry<String, DataPair> e : phaseData.entrySet()) {
        if (++row > numRows)
            break;
        data.setRowName(row, e.getKey());
        double value = plan ? e.getValue().plan : e.getValue().actual;
        data.setData(row, 1, new DoubleData(value / factor));
    }
    writeChart((plan ? "Plan" : "Actual"), titleRes, columnRes, data);
}
Also used : ResultSet(net.sourceforge.processdash.data.util.ResultSet) DoubleData(net.sourceforge.processdash.data.DoubleData) DataPair(net.sourceforge.processdash.util.DataPair)

Example 30 with ResultSet

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

the class QualityAnalysisPage method getAppraisalToFailureRatio.

@Chart(id = "AFR", type = "line", titleKey = "Quality.AFR_Title")
public ResultSet getAppraisalToFailureRatio(ChartData chartData) {
    ResultSet data = //
    chartData.getEnactmentResultSet("Quality.AFR_Label");
    writeAFR(data, 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