java项目性能测试模板_template-benchmark

template-benchmark

JMH benchmark for popular Java template engines:

Running the benchmark

Download the source code (git clone git@gitee.com:jfinal/template-benchmark.git)

Build it (mvn clean install)

Run the entire benchmark suite with java -jar target/benchmarks.jar

(Optional) To run a single benchmark, such as Mustache, use java -jar target/benchmarks.jar Enjoy

Generating plot

Run benchmark while exporting results to csv with java -jar target/benchmarks.jar -rff results.csv -rf csv

Use gnuplot to generate plot with gnuplot benchmark.plot. This will output results.png.

Rules of Template Engine Configuration

It is imperative that each template engine is configured in way to reflect real-world usage as opposed to it's optimal configuration. Typically this means an out-of-the-box configuration.

To strive for a common set of features across template engines, the following configurations are expected:

Disabling of HTML escaping

Template loaded from classpath prior to actual benchmark

Interpreting the Results

The benchmarks measure throughput, given in "ops/time". The time unit used is seconds.

Generally, the score represents the number of templates rendered per second; the higher the score, the better.

Example Results

442b0d2ed4314ee5de381438924541cb.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值