#4752 Start adding JMH benchmarks #4757
Merged
+310
−158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First step towards JMH benchmarks as discussed in #4752
BenchArrayCopy
to JMHThe output looks like this:
# Run complete. Total time: 00:01:32 Benchmark Mode Cnt Score Error Units ArrayCopyBenchmark.benchSystemCopy0 thrpt 10 54.219 ± 2.056 ops/ns ArrayCopyBenchmark.benchSystemCopy1 thrpt 10 0.338 ± 0.005 ops/ns ArrayCopyBenchmark.benchSystemCopy2 thrpt 10 0.326 ± 0.010 ops/ns ArrayCopyBenchmark.benchSystemCopy3 thrpt 10 0.308 ± 0.005 ops/ns ArrayCopyBenchmark.benchSystemCopy4 thrpt 10 0.295 ± 0.009 ops/ns ArrayCopyBenchmark.benchSystemCopy5 thrpt 10 0.205 ± 0.009 ops/ns ArrayCopyBenchmark.benchUtilsCopy0 thrpt 10 341532540.079 ± 9535315.085 ops/ns ArrayCopyBenchmark.benchUtilsCopy1 thrpt 10 3.179 ± 0.110 ops/ns ArrayCopyBenchmark.benchUtilsCopy2 thrpt 10 0.854 ± 0.015 ops/ns ArrayCopyBenchmark.benchUtilsCopy3 thrpt 10 0.532 ± 0.055 ops/ns ArrayCopyBenchmark.benchUtilsCopy4 thrpt 10 0.288 ± 0.013 ops/ns
Usage would be:
$ cd bench $ mvn clean install $ java -jar target/jruby-benchmark.jar