Skip to content

Commit

Permalink
Use the latest JMH
Browse files Browse the repository at this point in the history
This upgrades JMH to the latest available version. It required a
small code change to match the new API. This update primarily exists
because the old version of JMH placed @generated annotations in the
generated code, and these no longer exist on JDK 9.

Affects jgrapht#448
  • Loading branch information
io7m committed Feb 11, 2018
1 parent d266e26 commit f78402d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ public class GraphPerformanceTest
@State(Scope.Benchmark)
private static abstract class DirectedGraphBenchmarkBase
{

private Blackhole blackhole;
protected GnmRandomGraphGenerator<Integer, DefaultWeightedEdge> rgg;
private SimpleDirectedWeightedGraph<Integer, DefaultWeightedEdge> graph;

Expand All @@ -71,7 +69,7 @@ private static abstract class DirectedGraphBenchmarkBase
@Setup
public void setup()
{
blackhole = new Blackhole();

}

/**
Expand All @@ -94,7 +92,7 @@ public void generateGraphBenchmark()
* destroy graph
*/
@Benchmark
public void graphPerformanceBenchmark()
public void graphPerformanceBenchmark(Blackhole blackhole)
{
for (int i = 0; i < NR_GRAPHS; i++) {
rgg = new GnmRandomGraphGenerator<>(
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>1.10.3</version>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>1.10.3</version>
<version>1.20</version>
</dependency>
<dependency>
<groupId>org.tinyjee.jgraphx</groupId>
Expand Down

0 comments on commit f78402d

Please sign in to comment.