use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.
the class DefectAnalysisPage method getPhaseInjectionRates.
@//
Chart(//
id = "injRates", //
type = "line", //
titleKey = "Defects.Injection_Rate.Title", format = "noSkipLegend=t\nunits=${Defects.Injection_Rate.Units}\n" + "headerComment=${Defects.Injection_Rate.Units}")
public ResultSet getPhaseInjectionRates(ChartData chartData) {
List<String> phases = chartData.getPhases(PhaseType.Construction);
if (phases.isEmpty())
return null;
Collections.reverse(phases);
ResultSet data = getDefectsByPhase(chartData, phases, false, Denom.Rate);
return data;
}
use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.
the class DefectAnalysisPage method getDefectRemovalLeverage.
@//
Chart(//
id = "drl", //
type = "line", //
titleKey = "Defects.Leverage.Title", format = "headerComment=${Defects.Leverage.Comment_FMT}")
public ResultSet getDefectRemovalLeverage(ChartData chartData) {
ResultSet data = getPhaseRemovalRates(chartData);
if (data == null || data.numCols() < 2)
return null;
for (int row = data.numRows(); row > 0; row--) {
double denom = ((DoubleData) data.getData(row, 1)).getDouble();
for (int col = data.numCols(); col > 1; col--) {
double val = ((DoubleData) data.getData(row, col)).getDouble();
double drl = val / denom;
data.setData(row, col, num(drl));
}
data.setData(row, 1, num(1));
}
// store the name of the last workflow phase in the args, so it can
// be used in the construction of chart headers/labels
chartData.chartArgs = new String[] { data.getColName(1) };
return data;
}
Aggregations