From 5fb0a8a057774a7a431516f3e3cc4d7f931ee9c6 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Wed, 6 Mar 2019 21:21:28 +0100 Subject: [PATCH] Performance tests --- src/test/java/org/warp/jcwdb/tests/Performance.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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("-------------------------------------------------------+-----------------------------------------------------------------");