julien-truffaut/Monocle — pull request #132 by dwijnand (2014-09-16 16:09:18+00:00)
Title: Add bench module, using JMH & a token benchmark.

Run with:

monocle-bench/run -i 3 -wi 3 -f1 -t1

Returns:

[info] Benchmark Mode Samples Score Score error Units
[info] m.LensBench.LenserMacroGet thrpt 3 46429604.090 47629605.646 ops/s
[info] m.LensBench.LensesAnnotationMacroGet thrpt 3 46758656.780 25718778.637 ops/s
[info] m.LensBench.MkLensMacroGet thrpt 3 48159421.528 17478509.691 ops/s
[info] m.LensBench.SimpleLensInferredGet thrpt 3 48027987.301 20496467.231 ops/s
[info] m.LensBench.SimpleLensVerboseGet thrpt 3 46792889.950 24604272.636 ops/s
[info] m.LensBench.directGet thrpt 3 187532049.281 326046024.616 ops/s

Some good JMH references:
* http://openjdk.java.net/projects/code-tools/jmh/
* http://shipilev.net/blog/2014/nanotrusting-nanotime/
* https://github.com/ktoso/sbt-jmh
* And run: `monocle-bench/run -h`