Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

camel-jactl-benchmarks

JMH benchmarks for camel-jactl, Apache Camel's built-in language support for the Jactl scripting language.

Modelled on the Apache camel-performance-tests camel-jmh module (JoorTest et al), comparing camel-jactl against camel-groovy and Camel's Simple language across a few scenarios:

Class What it measures
LanguagePredicateTest Evaluation throughput of pre-compiled predicates/expressions, resolved through Camel's Language SPI.
LanguageCompileTest Cost of compiling a script and evaluating it once.
FilterRouteTest End-to-end cost of a Java DSL route whose filter predicate calls out to a scripting language.
ComplexRouteTest A realistic order-processing route using scripting for validation, content-based routing, and transformation, run end-to-end through the Camel engine.
ComplexScriptTest The "complex logic" scenario in isolation: closure pipelines, subtotals, and predicate scans over lists of 10/200 items.

Requirements

  • JDK 17+ to build (Camel 4.x requirement). The build uses Gradle toolchains and will pick up a 17 JDK from sdkman etc. automatically.
  • JDK 25 to run the benchmarks (this is the default but can be overridden - see below).
  • org.apache.camel:camel-jactl (part of Apache Camel since 4.22.0), resolved from Maven Central along with the rest of Camel.

Running

./gradlew benchmark                                        # full JMH run (slow)
./gradlew benchmark -Dbench.quick=true                      # smoke run (~1 min, inaccurate)
./gradlew benchmark --tests 'io.jactl.camel.jmh.LanguagePredicateTest'
./gradlew benchmark --tests '*.LanguagePredicateTest' -Dbench.method=jactlHeaderPredicate
./gradlew benchmark -PbenchJavaVersion=17                   # JVM to measure on

JSON results land in build/*.jmh.json, and a combined summary table is printed after every run (re-print it without rerunning via ./gradlew benchmarkReport).

Tune with:

  • -Dbench.warmupIterations
  • -Dbench.warmupTime
  • -Dbench.measureIterations
  • -Dbench.measureTime (seconds)
  • -Dbench.forks
  • -Dbench.method (regex over benchmark method names, e.g. jactl.*)

For example: -Dbench.measureTime=5 -Dbench.measureIterations=5 for publication-grade runs.

Everything is compiled for Java 17, but the forked JVM that JMH measures runs on Java 25 by default (the newest LTS that Camel supports). Pass -PbenchJavaVersion=17 (or 21) to measure on a different toolchain instead. The quick smoke run uses forks(0) and so runs in-process on the Java 17 test JVM - its numbers are not meaningful.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages