Ben Weidig created TAP5-2839:
--------------------------------

             Summary: Add JMH benchmarking
                 Key: TAP5-2839
                 URL: https://issues.apache.org/jira/browse/TAP5-2839
             Project: Tapestry 5
          Issue Type: Improvement
    Affects Versions: 5.10.0
            Reporter: Ben Weidig


Performance changes in Tapestry aren't currently measurable, at least not in a 
deterministic fashion.
There is no way to state what a change to the IoC registry, a coercion, or the 
DOM rendering actually costs based on hard numbers.

h4. Proposal

Introduce [JMH|https://github.com/openjdk/jmh] as a Gradle convention plugin 
({{tapestry.jmh-convention}}), so any module can carry microbenchmarks in 
{{src/jmh/java}}.

* JMH {{1.37}}, declared in the version catalog
* Benchmark source set compiles against the module's own classes and its 
{{provided}} configuration, mirroring the test source set
* Two tasks per module: {{jmh}} (run) and {{jmhList}} (list without running)
* Run options as {{-P}} properties: {{jmh.include}}, {{jmh.exclude}}, 
{{jmh.quick}}, {{jmh.forks}}, {{jmh.profilers}}, {{jmh.resultFile}}, and others
* Results are written as JSON, so a before/after pair can be diffed, and easier 
visualized

h4. CI

Benchmarks are deliberately *not* wired into {{check}} or {{build}}.
A JMH run can take minutes or even longer, and has therefore no place in CI.
The root task {{jmhCompileAll}} compiles every benchmark source set instead, so 
refactorings cannot break them silently.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to