diff --git a/src/test/java/org/warp/jcwdb/tests/Performance.java b/src/test/java/org/warp/jcwdb/tests/Performance.java index 54cb39b..fda4a9a 100644 --- a/src/test/java/org/warp/jcwdb/tests/Performance.java +++ b/src/test/java/org/warp/jcwdb/tests/Performance.java @@ -12,6 +12,7 @@ import org.warp.jcwdb.ann.*; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; public class Performance { @@ -31,7 +32,16 @@ public class Performance { */ public static void main(String[] args) throws IOException, InterruptedException { FAST_TESTS = args.length > 0 && args[0].equalsIgnoreCase("true"); - rootDirectory = Files.createTempDirectory("performance-tests"); + if (args.length >= 2) { + rootDirectory = Paths.get(args[1]); + try { + Files.createDirectory(rootDirectory); + } catch (Exception ex) { + + } + } else { + rootDirectory = Files.createTempDirectory("performance-tests"); + } generateDb(); System.out.println("Performance test started."); System.out.println("-------------------------------------------------------+-----------------------------------------------------------------");