Performance tests

This commit is contained in:
Andrea Cavalli 2019-03-06 21:21:28 +01:00
parent 1e735cd992
commit 5fb0a8a057

View File

@ -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");
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("-------------------------------------------------------+-----------------------------------------------------------------");