aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/FileMoveBenchmark.java
Commit message (Collapse)AuthorAgeFilesLines
* [benchmarks] Remove profiler configurationMatthias Sohn2022-11-151-2/+0
| | | | | | | Profiler configuration can be added when required. It was commented out in most benchmarks. Change-Id: I725f98757f7d4d2ba2589658e34e2fd6fbbbedee
* Add benchmark for strategies how to move a fileMatthias Sohn2020-06-061-0/+136
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>