return System.nanoTime() - time;
}
private static long benchmarkJsonLdJavaSesame(File path) throws SAXException, ParseException {
System.out.println("JsonLd-Java-Sesame benchmark");
AbstractModel model = new LinkedHashModel();
List<File> files = listFiles(path);
long time = System.nanoTime();
for (File file : files) {
try {
InputStream inputStream = new FileInputStream(file);
String baseURI = "http://example.org/baseuri/";
org.openrdf.model.Model statements = Rio.parse(inputStream, baseURI, RDFFormat.JSONLD);
model.addAll(statements);
} catch (Exception e) {
System.out.println("Skipped " + file.getAbsolutePath() + " due to " + e.getMessage());
}
}
System.out.println("Model size = " + model.size());
return System.nanoTime() - time;
}