jgit/org.eclipse.jgit.benchmarks
Matthias Sohn 8a44216e8b Add benchmark for strategies how to move a file
We can either
- try moving the file and, in case the target directory doesn't exist,
  handle the NoSuchFileException this raises to create the target
  directory
- or we always first test if the target directory exists and create it
 in case it is missing

On my Mac this yields

Benchmark                                        Mode  Cnt    Score     Error  Units
FileMoveBenchmark.moveFileToExistingDir        avgt    5  196.490 ±  15.194  us/op
FileMoveBenchmark.moveFileToExistingDirExists  avgt    5  223.217 ±  54.816  us/op
FileMoveBenchmark.moveFileToMissingDir         avgt    5  332.169 ±  43.871  us/op
FileMoveBenchmark.moveFileToMissingDirExists   avgt    5  303.815 ± 137.568  us/op

This means if the target directory of the move already exists the
first strategy is faster by around 25 us/op otherwise the second one
is faster by around 30 us/op. Which one is favorable depends on the
average probability that the target directory exists in real world
scenarios.

Change-Id: I03653b408b859a796508dfa1471b36c65633534e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-06-06 11:10:35 +02:00
..
.settings Merge branch 'stable-5.6' 2019-12-11 14:41:04 +01:00
src/org/eclipse/jgit/benchmarks Add benchmark for strategies how to move a file 2020-06-06 11:10:35 +02:00
.classpath Merge branch 'stable-5.6' 2020-01-09 16:52:56 +01:00
.gitignore JMH benchmark for SimpleLruCache 2019-11-05 14:50:32 +01:00
.project JMH benchmark for SimpleLruCache 2019-11-05 14:50:32 +01:00
BUILD Bazel: Add missing newlines at end of BUILD files 2019-11-26 08:43:10 +01:00
pom.xml Prepare 5.8.0-SNAPSHOT builds 2020-03-09 22:47:10 +01:00