Skip to content

Commit

Permalink
jmh test is more accurate when measuring the first command construction
Browse files Browse the repository at this point in the history
Otherwise, data structures are cached and constructions does less work
  • Loading branch information
Matt Jacobs committed Sep 23, 2016
1 parent f16c08f commit 62edc4a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class CommandConstructionPerfTest {
static HystrixCommandGroupKey groupKey = HystrixCommandGroupKey.Factory.asKey("Group");

@Benchmark
@BenchmarkMode({Mode.SampleTime})
@BenchmarkMode({Mode.SingleShotTime})
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public HystrixCommand constructHystrixCommandByGroupKeyOnly() {
return new HystrixCommand<Integer>(groupKey) {
Expand Down

0 comments on commit 62edc4a

Please sign in to comment.