Dav*_*ams 2 java benchmarking clojure
我正在寻找一个Java基准测试库.我对Clojure 中的Criterium基准测试库的功能非常熟悉和满意.它具有如下功能:
* Statistical processing of multiple evaluations
* Inclusion of a warm-up period, designed to allow the JIT compiler to optimise its code
* Purging of gc before testing, to isolate timings from GC state prior to testing
* A final forced GC after testing to estimate impact of cleanup on the timing results
Run Code Online (Sandbox Code Playgroud)
它的界面非常友好
(bench expr & opts)
Run Code Online (Sandbox Code Playgroud)
其中打印摘要统计报告,例如:
=> (bench (Thread/sleep 1000))
Execution time mean : 1.000803 sec
Execution time std-deviation : 328.501853 us
Execution time lower quantile : 1.000068 sec ( 2.5%)
Execution time upper quantile : 1.001186 sec (97.5%)
Run Code Online (Sandbox Code Playgroud)
我正在寻找一个类似的Java库,也许是一个公开一个Bench方法,比如一个Callable,或一个Runnable,并打印一个类似的报告.如:
BenchMark.bench(new Callable<String>() {
@Override
public String call() { ... }
})
Run Code Online (Sandbox Code Playgroud)
有没有人知道一个功能齐全,开源免费的啤酒库,这样做?也许还包括内存统计?