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;
}
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;
}
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));
}
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;
}
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));
}
}
Aggregations