Skip to content

Commit 62edc4a

Browse files
author
Matt Jacobs
committed
jmh test is more accurate when measuring the first command construction
Otherwise, data structures are cached and constructions does less work
1 parent f16c08f commit 62edc4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hystrix-core/src/jmh/java/com/netflix/hystrix/perf/CommandConstructionPerfTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class CommandConstructionPerfTest {
2929
static HystrixCommandGroupKey groupKey = HystrixCommandGroupKey.Factory.asKey("Group");
3030

3131
@Benchmark
32-
@BenchmarkMode({Mode.SampleTime})
32+
@BenchmarkMode({Mode.SingleShotTime})
3333
@OutputTimeUnit(TimeUnit.MICROSECONDS)
3434
public HystrixCommand constructHystrixCommandByGroupKeyOnly() {
3535
return new HystrixCommand<Integer>(groupKey) {

0 commit comments

Comments
 (0)