NumberOnlyBuildLabel buildNoLabel = new NumberOnlyBuildLabel( currentBuild );
@Override public String generateToolTip(CategoryDataset dataset, int row, int column) { NumberOnlyBuildLabel label = (NumberOnlyBuildLabel) dataset.getColumnKey(column); TestNGTestResultBuildAction report = label.getRun().getAction(TestNGTestResultBuildAction.class); if (report == null) { //there are no testng results associated with this build return ""; } switch (row) { case 0: return String.valueOf(report.getFailCount()) + " Failure(s)"; case 1: return String.valueOf(report.getTotalCount() - report.getFailCount() - report.getSkipCount()) + " Pass"; case 2: return String.valueOf(report.getSkipCount()) + " Skip(s)"; default: return ""; } } };
ChartUtil.NumberOnlyBuildLabel label = new ChartUtil.NumberOnlyBuildLabel(c.getOwner()); results.put(label.toString(), r);
Run<?, ?> currentBuild = (Run<?, ?>) build; if (buildsLimits.in(nbBuildsToAnalyze)) { NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(currentBuild); PerformanceReport performanceReport = getPerformanceReport(currentBuild, performanceReportNameFile); if (performanceReport == null) {
NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(a.getBuild()); if (a.Statement != null) { totals[0] += a.Statement.getPercentageFloat();
for (Run<?, ?> currentBuild : builds) { if (buildsLimits.in(nbBuildsToAnalyze)) { NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(currentBuild); PerformanceBuildAction performanceBuildAction = currentBuild .getAction(PerformanceBuildAction.class);
NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build);
NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build); PerformanceBuildAction performanceBuildAction = build .getAction(PerformanceBuildAction.class);
NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(currentBuild); PerformanceBuildAction performanceBuildAction = currentBuild .getAction(PerformanceBuildAction.class);
+ nums[Severity.MEDIUM_LOW_VALUE], MEDIUM_ROW, new NumberOnlyBuildLabel(r.getBuild())); builder.add( nums[Severity.HIGH_VALUE], HIGH_ROW, new NumberOnlyBuildLabel(r.getBuild())); builder.add( nums[Severity.LOW_VALUE], LOW_ROW, new NumberOnlyBuildLabel(r.getBuild()));
for( Chartable a = chartable; a != null; a = a.getPreviousResult()) ChartUtil.NumberOnlyBuildLabel label = new ChartUtil.NumberOnlyBuildLabel( a.getOwner() ); for( Map.Entry<CoverageMetric, Ratio> value: a.getResults().entrySet() )
NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build);
= new ChartUtil.NumberOnlyBuildLabel(r.getBuild()); for (String ty: r.getViolations().keySet()) { dsb.add(roundUp(r.getViolations().get(ty)), ty, label);
= new ChartUtil.NumberOnlyBuildLabel(r.getBuild()); for (String ty: r.getViolations().keySet()) { dsb.add(roundUp(r.getViolations().get(ty)), ty, label);
NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build);
/** * This corresponds to the url ./graph. * * @param req * the request parameters. * @param rsp * the response. * @throws IOException * if there is an error writing the graph */ public void doGraph(StaplerRequest req, StaplerResponse rsp) throws IOException { String type = req.getParameter("type"); if (ChartUtil.awtProblemCause != null) { // not available. send out error message rsp.sendRedirect2(req.getContextPath() + "/images/headless.png"); return; } getBuild().getTimestamp(); if (!StringUtil.isBlank(type)) { ChartUtil.generateGraph(req, rsp, new SeverityTypeDataSet(getReport(), type).createChart(), X_SIZE, Y_SIZE); return; } DataSetBuilder<String, ChartUtil.NumberOnlyBuildLabel> dsb = new DataSetBuilder<String, ChartUtil.NumberOnlyBuildLabel>(); for (ViolationsReport r : ViolationsReport.iteration(getBuild())) { for (String ty : r.getViolations().keySet()) { dsb.add(roundUp(r.getViolations().get(ty)), ty, new ChartUtil.NumberOnlyBuildLabel((Run) r.getBuild())); } } ChartUtil.generateGraph(req, rsp, createChart(dsb.build()), X_SIZE, Y_SIZE); }
public void doThroughputGraph(StaplerRequest request, StaplerResponse response) throws IOException { String parameter = request.getParameter("performanceReportPosition"); if (parameter == null) { return; } if (ChartUtil.awtProblemCause != null) { // not available. send out error message response.sendRedirect2(request.getContextPath() + "/images/headless.png"); return; } final DataSetBuilder<String, NumberOnlyBuildLabel> dataSetBuilder = new DataSetBuilder<>(); List<? extends Run<?, ?>> builds = buildAction.getBuild().getParent().getBuilds(); for (final Run<?, ?> build : builds) { final PerformanceBuildAction performanceBuildAction = build.getAction(PerformanceBuildAction.class); if (performanceBuildAction == null) { continue; } final PerformanceReport performanceReport = performanceBuildAction .getPerformanceReportMap().getPerformanceReport(parameter); if (performanceReport == null) { continue; } final ThroughputReport throughputReport = new ThroughputReport(performanceReport); final NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build); dataSetBuilder.add(throughputReport.get(), Messages.ProjectAction_RequestsPerSeconds(), label); } ChartUtil.generateGraph(request, response, createThroughputChart((dataSetBuilder.build())), 400, 200); }
final NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build); dataSetBuilder.add(throughputReport.get(), Messages.ProjectAction_RequestsPerSeconds(), label);
continue; NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build); PerformanceBuildAction performanceBuildAction = build .getAction(PerformanceBuildAction.class);
+ nums[Severity.MEDIUM_LOW_VALUE], MEDIUM_ROW, new NumberOnlyBuildLabel(r.getBuild())); builder.add( nums[Severity.HIGH_VALUE], HIGH_ROW, new NumberOnlyBuildLabel(r.getBuild())); builder.add( nums[Severity.LOW_VALUE], LOW_ROW, new NumberOnlyBuildLabel(r.getBuild()));