Search in sources :

Example 1 with Enactment

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

the class PlanAnalysisPage method getActualSize.

@//
Chart(//
id = "size", //
type = "line", //
params = "units", titleKey = "Plan.Size_Title_FMT")
public ResultSet getActualSize(ChartData chartData) {
    String units = chartData.chartArgs[0];
    ResultSet data = chartData.getEnactmentResultSet(1);
    data.setColName(1, units);
    for (int row = data.numRows(); row > 0; row--) {
        Enactment e = (Enactment) data.getRowObj(row);
        data.setData(row, 1, num(e.actualSize(units)));
    }
    return data;
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 2 with Enactment

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

the class PlanAnalysisPage method getEstErrorScatterChart.

@//
Chart(//
id = "estErrScatter", //
type = "estErrorScatter", //
params = "units", titleKey = "EstErrorScatterChart.Title", format = "skipUnitsCol=t")
public ResultSet getEstErrorScatterChart(ChartData chartData) {
    ResultSet data = chartData.getEnactmentResultSet(//
    "Plan.Size_Scatter_Plan_FMT", //
    "Plan.Size_Scatter_Actual_FMT", //
    "EstErrorScatterChart.Size_Est_Error", //
    "Plan.Time_Scatter_Plan", //
    "Plan.Time_Scatter_Actual", "EstErrorScatterChart.Time_Est_Error");
    data.setFormat(3, "100%");
    data.setFormat(6, "100%");
    String units = chartData.chartArgs[0];
    for (int row = data.numRows(); row > 0; row--) {
        Enactment e = (Enactment) data.getRowObj(row);
        double planSize = chartData.histData.getSize(e, units, false);
        double actualSize = e.actualSize(units);
        double sizeErr = (actualSize - planSize) / planSize;
        data.setData(row, 1, num(planSize));
        data.setData(row, 2, num(actualSize));
        data.setData(row, 3, num(sizeErr));
        double planTime = chartData.histData.getTime(e, null, false);
        double actualTime = e.actualTime();
        double timeErr = (actualTime - planTime) / planTime;
        data.setData(row, 4, num(planTime / 60));
        data.setData(row, 5, num(actualTime / 60));
        data.setData(row, 6, num(timeErr));
    }
    return data;
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 3 with Enactment

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

the class PlanAnalysisPage method getSizeDistribution.

@//
Chart(//
id = "sizeDist", //
type = "bar", //
params = "units", //
titleKey = "Plan.Distribution.Size.Title_FMT", format = "chartCols=4\nheaderComment=${Plan.Distribution.Size.Header}")
public ResultSet getSizeDistribution(ChartData chartData) {
    String units = chartData.chartArgs[0];
    List<Double> sizes = new ArrayList<Double>();
    for (Enactment e : chartData.histData.getEnactments()) sizes.add(e.actualSize(units));
    return createLogNormalHistogram(sizes, "Plan.Distribution.Size.Range", resources.format("Plan.Distribution.Size.Label_FMT", units));
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ArrayList(java.util.ArrayList)

Example 4 with Enactment

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

the class ChartData method getEnactmentResultSet.

public ResultSet getEnactmentResultSet(int numColumns) {
    List<Enactment> enactments = histData.getEnactments();
    ResultSet result = new ResultSet(enactments.size(), numColumns);
    result.setColName(0, getRes("Project/Task"));
    for (int i = enactments.size(); i-- > 0; ) result.setRowName(i + 1, enactments.get(i));
    return result;
}
Also used : Enactment(net.sourceforge.processdash.tool.db.WorkflowHistDataHelper.Enactment) ResultSet(net.sourceforge.processdash.data.util.ResultSet)

Example 5 with Enactment

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

the class ProcessAnalysisPage method writeProductivity.

private void writeProductivity(ChartData chartData, ResultSet data, int col) {
    data.setColName(col, resources.format("Process.Productivity_Label_FMT", chartData.primarySizeUnits));
    for (int row = data.numRows(); row > 0; row--) {
        Enactment e = (Enactment) data.getRowObj(row);
        double size = e.actualSize(chartData.primarySizeUnits);
        double time = e.actualTime() / 60;
        data.setData(row, col, num(size / time));
    }
}
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