本文整理汇总了Java中org.openjdk.jmh.infra.Blackhole.consumeCPU方法的典型用法代码示例。如果您正苦于以下问题:Java Blackhole.consumeCPU方法的具体用法?Java Blackhole.consumeCPU怎么用?Java Blackhole.consumeCPU使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openjdk.jmh.infra.Blackhole
的用法示例。
在下文中一共展示了Blackhole.consumeCPU方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: consume_0000
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0000() {
Blackhole.consumeCPU(0);
}
示例2: consume_0001
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0001() {
Blackhole.consumeCPU(1);
}
示例3: consume_0002
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0002() {
Blackhole.consumeCPU(2);
}
示例4: consume_0004
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0004() {
Blackhole.consumeCPU(4);
}
示例5: consume_0008
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0008() {
Blackhole.consumeCPU(8);
}
示例6: consume_0016
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0016() {
Blackhole.consumeCPU(16);
}
示例7: consume_0032
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0032() {
Blackhole.consumeCPU(32);
}
示例8: consume_0064
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0064() {
Blackhole.consumeCPU(64);
}
示例9: consume_0128
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0128() {
Blackhole.consumeCPU(128);
}
示例10: consume_0256
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0256() {
Blackhole.consumeCPU(256);
}
示例11: consume_0512
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_0512() {
Blackhole.consumeCPU(512);
}
示例12: consume_1024
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Benchmark
public void consume_1024() {
Blackhole.consumeCPU(1024);
}
示例13: apply
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Override
public Integer apply(Integer t) throws Exception {
Blackhole.consumeCPU(compute);
return t;
}
示例14: next
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Override
public Integer next() {
Blackhole.consumeCPU(10);
return i++;
}
示例15: onNext
import org.openjdk.jmh.infra.Blackhole; //导入方法依赖的package包/类
@Override
public void onNext(Object t) {
bh.consume(t);
Blackhole.consumeCPU(cycles);
}