Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

toolkit-benchmark

JMH benchmarks comparing the stable gephi-toolkit (Maven Central) against a snapshot layout-plugin build.

Both versions provide a class with the same name (org.gephi.layout.plugin.forceAtlas.ForceAtlas, ...forceAtlas2.ForceAtlas2, etc.), so they can't be regular dependencies of the same module at once. The layout-plugin-snapshot module works around this with maven-shade-plugin: it repackages the snapshot build's classes (and its META-INF/services SPI entries) under the snapshot.* prefix. The benchmarks module then depends on both gephi-toolkit and this relocated jar side by side.

Configuring versions

Both versions under test are properties in the root pom.xml — change them there, nowhere else:

  • gephi-toolkit.version — the stable gephi-toolkit to pull from Maven Central.
  • layout-plugin.snapshot.version — the snapshot layout-plugin build to compare against. This must already be installed in your local ~/.m2 repo (built from your gephi checkout) — it's not fetched from anywhere else. It also doubles as layout-plugin-snapshot's own module version, so Maven prints a harmless 'version' contains an expression but should be a constant warning; that's expected and safe to ignore.

After changing either property, rebuild with mvn install (see below) before running benchmarks.

Build

mvn install

Re-run this whenever layout-plugin-snapshot changes — benchmarks resolves it from your local ~/.m2 repo, not from an in-memory reactor.

Run benchmarks

All benchmarks:

mvn -pl benchmarks exec:java

One class, or a name filter (JMH treats the argument as a regex):

mvn -pl benchmarks exec:java -Dexec.args="ForceAtlas2StableVsSnapshotBenchmark"

Quick smoke test (short warmup/measurement, useful while iterating):

mvn -pl benchmarks exec:java -Dexec.args="ForceAtlas2StableVsSnapshotBenchmark -wi 1 -i 2 -w 500ms -r 500ms"

List available benchmarks without running them:

mvn -pl benchmarks exec:java -Dexec.args="-l"

Silence the harmless SEVERE ... InaccessibleObjectException NetBeans logs on JDK 9+ (no effect on results):

MAVEN_OPTS="--add-opens java.base/java.net=ALL-UNNAMED" mvn -pl benchmarks exec:java

Benchmarks

  • ForceAtlas2StableVsSnapshotBenchmark — cost of one ForceAtlas2.goAlgo() iteration on a fixed 200-node random graph, default settings, stable vs. snapshot.

Notes

  • Benchmarks run with @Fork(0) (in-process). mvn exec:java resolves the classpath through a custom classloader, not the JVM's java.class.path, so JMH's normal forked-JVM mode can't launch its subprocess. Fine for local iteration; not representative of a fully isolated, publishable measurement.
  • There's no uber jar. Given gephi-toolkit's huge dependency tree (NetBeans platform, Batik, POI, PDFBox, several JDBC drivers, ...), shading it all into one runnable jar added build time and noise for no benefit — the actual class-collision problem is already solved by layout-plugin-snapshot.

About

JMH-based benchmarks for core modules (layout, statistics...)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages