当前位置: 首页>>代码示例>>Java>>正文


Java PerformanceRequirement.getAverage方法代码示例

本文整理汇总了Java中org.databene.contiperf.PerformanceRequirement.getAverage方法的典型用法代码示例。如果您正苦于以下问题:Java PerformanceRequirement.getAverage方法的具体用法?Java PerformanceRequirement.getAverage怎么用?Java PerformanceRequirement.getAverage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.databene.contiperf.PerformanceRequirement的用法示例。


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

示例1: printAverageStats

import org.databene.contiperf.PerformanceRequirement; //导入方法依赖的package包/类
private static void printAverageStats(LatencyCounter[] counters,
    PerformanceRequirement requirement, PrintWriter out) {
Verdict verdict = ReportUtil.averageVerdict(counters[0], requirement);
Long required = (requirement != null && requirement.getAverage() > 0 ? (long) requirement
	.getAverage() : null);
long[] secondaryValues = null;
if (counters.length > 1) {
    secondaryValues = new long[counters.length - 1];
    for (int i = 1; i < counters.length; i++) {
	secondaryValues[i - 1] = (long) counters[i].averageLatency();
    }
}
printStatMsLine("Average latency:",
	(long) counters[0].averageLatency(), required, secondaryValues,
	verdict, out);
   }
 
开发者ID:lucaspouzac,项目名称:contiperf,代码行数:17,代码来源:HtmlReportModule.java

示例2: averageVerdict

import org.databene.contiperf.PerformanceRequirement; //导入方法依赖的package包/类
public static Verdict averageVerdict(LatencyCounter counter,
    PerformanceRequirement requirement) {
if (requirement == null || requirement.getAverage() < 0
	|| counter.getAssertionErrors().size() > 0) {
    return Verdict.IGNORED;
}
return (counter.averageLatency() <= requirement.getAverage() ? Verdict.SUCCESS
	: Verdict.FAILURE);
   }
 
开发者ID:lucaspouzac,项目名称:contiperf,代码行数:10,代码来源:ReportUtil.java


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