• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DataSetBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中hudson.util.DataSetBuilder的典型用法代码示例。如果您正苦于以下问题:Java DataSetBuilder类的具体用法?Java DataSetBuilder怎么用?Java DataSetBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataSetBuilder类属于hudson.util包,在下文中一共展示了DataSetBuilder类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: doStats

import hudson.util.DataSetBuilder; //导入依赖的package包/类
private CategoryDataset doStats() {
	DataSetBuilder<String, ChartUtil.NumberOnlyBuildLabel> coverageDataSetBuilder = new DataSetBuilder<String, ChartUtil.NumberOnlyBuildLabel>();

	for (Run<?,?> build : this.project.getProject().getBuilds()) {
		final BuildAction build_action = build.getAction(BuildAction.class);
		if (build_action == null) {
			// no build action is associated with this build, so skip it
			continue;
		}

		Set<String> criteria = build_action.getProjectAction().getCriteria();
		for (String criterion : criteria) {
			double coverage = build_action.getProjectAction().getCriterionCoverage(criterion);
			coverageDataSetBuilder.add(coverage, criterion, new ChartUtil.NumberOnlyBuildLabel(build));
		}
	}

	return coverageDataSetBuilder.build();
}
 
开发者ID:EvoSuite,项目名称:evosuite,代码行数:20,代码来源:CoveragePlot.java


示例2: doStats

import hudson.util.DataSetBuilder; //导入依赖的package包/类
private CategoryDataset doStats() {
	DataSetBuilder<String, ChartUtil.NumberOnlyBuildLabel> timeDataSetBuilder = new DataSetBuilder<String, ChartUtil.NumberOnlyBuildLabel>();

	for (Run<?,?> build : this.project.getProject().getBuilds()) {
		final BuildAction build_action = build.getAction(BuildAction.class);
		if (build_action == null) {
			// no build action is associated with this build, so skip it
			continue;
		}

		int timeBudget = build_action.getProjectAction().getTimeBudget();
		timeDataSetBuilder.add(timeBudget, "Total Time Budget", new ChartUtil.NumberOnlyBuildLabel(build));
		int totalEffort = build_action.getProjectAction().getTotalEffort();
		timeDataSetBuilder.add(totalEffort, "Time Budget Used", new ChartUtil.NumberOnlyBuildLabel(build));
	}

	return timeDataSetBuilder.build();
}
 
开发者ID:EvoSuite,项目名称:evosuite,代码行数:19,代码来源:TimePlot.java


示例3: createDurationTrendGraph

import hudson.util.DataSetBuilder; //导入依赖的package包/类
/**
 * Generate a duration trend graph for device minutes used for recent results.
 *
 * @param owner       The build which owns the latest result.
 * @param isCompleted The flag to denote if the result is completed which determines our caching.
 * @param results     The list of previous to latest results which generate the trend.
 * @return The duration trend graph.
 */
public static Graph createDurationTrendGraph(AbstractBuild<?, ?> owner, Boolean isCompleted, List<AWSDeviceFarmTestResult> results) {
    DataSetBuilder<String, NumberOnlyBuildLabel> builder = new DataSetBuilder<String, NumberOnlyBuildLabel>();

    for (AWSDeviceFarmTestResult result : results) {
        // Create label for this result using its Jenkins build number.
        Run<?, ?> build = result.getOwner();
        NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build);

        // Attach duration value for all results in our trend.
        builder.add(result.getDuration(), "Minutes", label);
    }

    CategoryDataset dataset = builder.build();
    Color[] colors = new Color[]{AWSDeviceFarmGraph.DurationColor};
    return new AWSDeviceFarmGraph(owner, isCompleted, getGraphSize(), dataset, "Build #", "Device Minutes Used", colors);
}
 
开发者ID:awslabs,项目名称:aws-device-farm-jenkins-plugin,代码行数:25,代码来源:AWSDeviceFarmGraph.java


示例4: createDurationTrendGraph

import hudson.util.DataSetBuilder; //导入依赖的package包/类
/**
 * Generate a duration trend graph for device minutes used for recent results.
 * @param owner build which owns the latest result
 * @param isCompleted flag to denote if the result is completed which determines our caching
 * @param results list of previous to latest results which generate the trend
 * @return
 */
public static Graph createDurationTrendGraph(AbstractBuild<?, ?> owner, Boolean isCompleted, List<AppThwackTestResult> results) {
    DataSetBuilder<String, NumberOnlyBuildLabel> builder = new DataSetBuilder<String, NumberOnlyBuildLabel>();

    for (AppThwackTestResult result : results) {
        // Create label for this result using its Jenkins build number.
        AbstractBuild<?, ?> build = result.getOwner();
        NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build);

        // Attach duration value for all results in our trend.
        builder.add(result.getDuration(), "Minutes", label);
    }

    CategoryDataset dataset = builder.build();
    Color[] colors = new Color[] { AppThwackGraph.DurationColor };
    return new AppThwackGraph(owner, isCompleted, getGraphSize(), dataset, "Build #", "Device Minutes Used", colors);
}
 
开发者ID:jenkinsci,项目名称:appthwack-plugin,代码行数:24,代码来源:AppThwackGraph.java


示例5: createCpuTrendGraph

import hudson.util.DataSetBuilder; //导入依赖的package包/类
/**
 * Generate a CPU usage trend graph for recent results.
 * @param owner build which owns the latest result
 * @param isCompleted flag to denote if the result is completed which determines our caching
 * @param results list of previous to latest results which generate the trend
 * @return
 */
public static Graph createCpuTrendGraph(AbstractBuild<?, ?> owner, Boolean isCompleted, List<AppThwackTestResult> results) {
    DataSetBuilder<String, NumberOnlyBuildLabel> builder = new DataSetBuilder<String, NumberOnlyBuildLabel>();

    for (AppThwackTestResult result : results) {
        // Create label for this result using its Jenkins build number.
        AbstractBuild<?, ?> build = result.getOwner();
        NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build);

        // Attach CPU average value for each result in our trend.
        float cpuAvg = result.getCpuAvg();
        builder.add(cpuAvg, "CPU", label);
    }

    CategoryDataset dataset = builder.build();
    Color[] colors = new Color[] { AppThwackGraph.PassColor };
    return new AppThwackGraph(owner, isCompleted, getGraphSize(), dataset, "Build #", "CPU Average (%)", colors);
}
 
开发者ID:jenkinsci,项目名称:appthwack-plugin,代码行数:25,代码来源:AppThwackGraph.java


示例6: createMemoryTrendGraph

import hudson.util.DataSetBuilder; //导入依赖的package包/类
/**
 * Generate a memory usage (KB) trend graph for recent results.
 * @param owner build which owns the latest result
 * @param isCompleted flag to denote if the result is completed which determines our caching
 * @param results list of previous to latest results which generate the trend
 * @return
 */
public static Graph createMemoryTrendGraph(AbstractBuild<?, ?> owner, Boolean isCompleted, List<AppThwackTestResult> results) {
    DataSetBuilder<String, NumberOnlyBuildLabel> builder = new DataSetBuilder<String, NumberOnlyBuildLabel>();

    for (AppThwackTestResult result : results) {
        // Create label for this result using its Jenkins build number.
        AbstractBuild<?, ?> build = result.getOwner();
        NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build);

        // Attach memory average value for each result in our trend.
        float memoryAvg = result.getMemoryAvg();
        builder.add(memoryAvg, "Memory", label);
    }

    CategoryDataset dataset = builder.build();
    Color[] colors = new Color[] { AppThwackGraph.PassColor };
    return new AppThwackGraph(owner, isCompleted, getGraphSize(), dataset, "Build #", "Memory Average (KB)", colors);
}
 
开发者ID:jenkinsci,项目名称:appthwack-plugin,代码行数:25,代码来源:AppThwackGraph.java


示例7: createThreadTrendGraph

import hudson.util.DataSetBuilder; //导入依赖的package包/类
/**
 * Generate a thread count trend graph for recent results.
 * @param owner build which owns the latest result
 * @param isCompleted flag to denote if the result is completed which determines our caching
 * @param results list of previous to latest results which generate the trend
 * @return
 */
public static Graph createThreadTrendGraph(AbstractBuild<?, ?> owner, Boolean isCompleted, List<AppThwackTestResult> results) {
    DataSetBuilder<String, NumberOnlyBuildLabel> builder = new DataSetBuilder<String, NumberOnlyBuildLabel>();

    for (AppThwackTestResult result : results) {
        // Create label for this result using its Jenkins build number.
        AbstractBuild<?, ?> build = result.getOwner();
        NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build);

        // Attach thread count average value for each result in our trend.
        float threadAvg = result.getThreadAvg();
        builder.add(threadAvg, "Threads", label);
    }

    CategoryDataset dataset = builder.build();
    Color[] colors = new Color[] { AppThwackGraph.PassColor };
    return new AppThwackGraph(owner, isCompleted, getGraphSize(), dataset, "Build #", "Threads Average", colors);
}
 
开发者ID:jenkinsci,项目名称:appthwack-plugin,代码行数:25,代码来源:AppThwackGraph.java


示例8: createFrameDrawTrendGraph

import hudson.util.DataSetBuilder; //导入依赖的package包/类
/**
 * Generate a frame draw time trend graph for recent results.
 * @param owner build which owns the latest result
 * @param isCompleted flag to denote if the result is completed which determines our caching
 * @param results list of previous to latest results which generate the trend
 * @return
 */
public static Graph createFrameDrawTrendGraph(AbstractBuild<?, ?> owner, Boolean isCompleted, List<AppThwackTestResult> results) {
    DataSetBuilder<String, NumberOnlyBuildLabel> builder = new DataSetBuilder<String, NumberOnlyBuildLabel>();

    for (AppThwackTestResult result : results) {
        // Create label for this result using its Jenkins build number.
        AbstractBuild<?, ?> build = result.getOwner();
        NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build);

        // Attach Frame Draw Times average value for each result in our trend.
        float drawTime = result.getDrawTimeAvg();
        builder.add(drawTime, "Frame Draw Time", label);
    }

    CategoryDataset dataset = builder.build();
    Color[] colors = new Color[] { AppThwackGraph.PassColor };
    return new AppThwackGraph(owner, isCompleted, getGraphSize(), dataset, "Build #", "Frame Draw Time Average (ms)", colors);
}
 
开发者ID:jenkinsci,项目名称:appthwack-plugin,代码行数:25,代码来源:AppThwackGraph.java


示例9: createFpsTrendGraph

import hudson.util.DataSetBuilder; //导入依赖的package包/类
/**
 * Generate a FPS trend graph for recent results.
 * @param owner build which owns the latest result
 * @param isCompleted flag to denote if the result is completed which determines our caching
 * @param results list of previous to latest results which generate the trend
 * @return
 */
public static Graph createFpsTrendGraph(AbstractBuild<?, ?> owner, Boolean isCompleted, List<AppThwackTestResult> results) {
    DataSetBuilder<String, NumberOnlyBuildLabel> builder = new DataSetBuilder<String, NumberOnlyBuildLabel>();

    for (AppThwackTestResult result : results) {
        // Create label for this result using its Jenkins build number.
        AbstractBuild<?, ?> build = result.getOwner();
        NumberOnlyBuildLabel label = new NumberOnlyBuildLabel(build);

        // Attach FPS average value for each result in our trend.
        float fps = result.getFpsAvg();
        builder.add(fps, "FPS", label);
    }

    CategoryDataset dataset = builder.build();
    Color[] colors = new Color[] { AppThwackGraph.PassColor };
    return new AppThwackGraph(owner, isCompleted, getGraphSize(), dataset, "Build #", "FPS Average", colors);
}
 
开发者ID:jenkinsci,项目名称:appthwack-plugin,代码行数:25,代码来源:AppThwackGraph.java


示例10: createDataSet

import hudson.util.DataSetBuilder; //导入依赖的package包/类
protected DataSetBuilder<String, ChartLabel> createDataSet() {
	DataSetBuilder<String, ChartLabel> data = new DataSetBuilder<String, ChartLabel>();
	AbstractBuild<?, ?> build = project.getLastCompletedBuild();
	while(build != null) {
		final List<CoverityBuildAction> actions = build.getActions(CoverityBuildAction.class);

		for(CoverityBuildAction action : actions) {
			if(action != null) {
				data.add(action.getDefectIds().size(), action.getId(), new ChartLabel(build));
			}
		}
		build = build.getPreviousBuild();
	}
	return data;

}
 
开发者ID:hudson3-plugins,项目名称:coverity-plugin,代码行数:17,代码来源:CoverityProjectAction.java


示例11: buildDataSet

import hudson.util.DataSetBuilder; //导入依赖的package包/类
private CategoryDataset buildDataSet() {
  DataSetBuilder<String, RevisionLabel> dsb = new DataSetBuilder<String, RevisionLabel>();

  int number = 1;
  for (Map.Entry<String, SingleTestFlakyStats> entry : flakyStatsRevisionMap.entrySet()) {
    dsb.add(entry.getValue().fail, "failed", new RevisionLabel(number, entry.getKey()));
    dsb.add(entry.getValue().pass, "passed", new RevisionLabel(number, entry.getKey()));
    number++;
  }

  return dsb.build();
}
 
开发者ID:jenkinsci,项目名称:flaky-test-handler-plugin,代码行数:13,代码来源:TestFlakyStatsOverRevision.java


示例12: getDataSetBuilder

import hudson.util.DataSetBuilder; //导入依赖的package包/类
private DataSetBuilder<String, String> getDataSetBuilder() throws IOException, InterruptedException
{
    DataSetBuilder<String, String> dsb = new DataSetBuilder<String, String>();
    for (MassifReportSnapshot snapshot : report.getSnapshots()) {
        String label = "#" + snapshot.getSnapshotID().toString();
        //dsb.add(snapshot.getTotalUsage(), "Total", label);
        dsb.add(snapshot.getMemoryHeap(), "Heap", label);
        dsb.add(snapshot.getMemoryHeapExtra(), "Heap Extra", label);
        dsb.add(snapshot.getMemoryStacks(), "Stacks", label);
    }
    return dsb;
}
 
开发者ID:Perlmint,项目名称:massif-plugin,代码行数:13,代码来源:MassifReportDetail.java


示例13: createGraph

import hudson.util.DataSetBuilder; //导入依赖的package包/类
@Override
protected JFreeChart createGraph()
{
    DataSetBuilder<Row, NumberOnlyBuildLabel> dataSetBuilder = new DataSetBuilder<Row, NumberOnlyBuildLabel>();
    for (GraphPoint point : points)
    {
        dataSetBuilder.add(point.getConcernDiagnosticsCount(), CONCERN_ROW, new NumberOnlyBuildLabel(point.getBuild()));
        dataSetBuilder.add(point.getWarningDiagnosticsCount(), WARNING_ROW, new NumberOnlyBuildLabel(point.getBuild()));
        dataSetBuilder.add(point.getErrorDiagnosticsCount(), ERROR_ROW, new NumberOnlyBuildLabel(point.getBuild()));
    }

    final JFreeChart chart = ChartFactory.createStackedAreaChart(
        null, // chart title
        null, // category axis label
        "Diagnostics", // value axis label
        dataSetBuilder.build(), // dataset
        PlotOrientation.VERTICAL, // orientation
        false, // include legend
        true, // tooltips
        true // urls
    );

    chart.setBackgroundPaint(Color.white);

    final CategoryPlot plot = chart.getCategoryPlot();
    plot.setBackgroundPaint(Color.WHITE);
    plot.setOutlinePaint(null);
    plot.setRangeGridlinesVisible(true);
    plot.setRangeGridlinePaint(Color.black);
    
    CategoryAxis domainAxis = new ShiftedCategoryAxis("Build Number");
    plot.setDomainAxis(domainAxis);
    domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
    domainAxis.setLowerMargin(0.0);
    domainAxis.setUpperMargin(0.0);
    domainAxis.setCategoryMargin(0.0);
  
    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    
    StackedAreaRenderer renderer = new StackedAreaRenderer2();
    plot.setRenderer(renderer);
    renderer.setSeriesPaint(2, RED);
    renderer.setSeriesPaint(1, YELLOW);
    renderer.setSeriesPaint(0, CYAN);

    // crop extra space around the graph
    plot.setInsets(new RectangleInsets(5.0, 0, 0, 5.0));
    return chart;
}
 
开发者ID:FauxPasApp,项目名称:fauxpas-jenkins-plugin,代码行数:51,代码来源:FauxPasBuildGraph.java



注:本文中的hudson.util.DataSetBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PatchResult类代码示例发布时间:2022-05-22
下一篇:
Java Description类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap