-
-
Save zivce/daedb06e70f1f85cd8f3a25c6dce55c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Warmup(iterations = 50, time = 2, timeUnit = TimeUnit.MILLISECONDS) | |
@Measurement(iterations = 3, time = 2, timeUnit = TimeUnit.MILLISECONDS) | |
@Fork(1) | |
@State(Scope.Benchmark) | |
@OutputTimeUnit(TimeUnit.MILLISECONDS) | |
@BenchmarkMode({ Mode.AverageTime}) | |
public class CatClient { | |
private static Cat9 cat9 = new Cat9("Cat9"); | |
private static Cat cat = new Cat("OlderCat"); | |
@Benchmark | |
public void testJava9Way() | |
{ | |
cat9.walk(); | |
cat9.retreat(); | |
cat9.fastRetreat(); | |
cat9.fastWalk(); | |
cat9.run(); | |
} | |
@Benchmark | |
public void testJava8Way() | |
{ | |
cat.walk(); | |
cat.retreat(); | |
cat.fastRetreat(); | |
cat.fastWalk(); | |
cat9.run(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment