From 60e2402fd230b846225e0f80f803da648ef8461e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Avard=20Ottestad?= Date: Sun, 18 Dec 2022 10:27:16 +0100 Subject: [PATCH] GH-4232 updated benchmark to reproduce the issue --- .../benchmark/SPARQLValuesClauseBenchmark.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core/sail/nativerdf/src/test/java/org/eclipse/rdf4j/sail/nativerdf/benchmark/SPARQLValuesClauseBenchmark.java b/core/sail/nativerdf/src/test/java/org/eclipse/rdf4j/sail/nativerdf/benchmark/SPARQLValuesClauseBenchmark.java index 210c76d7d6f..4917ef0341c 100644 --- a/core/sail/nativerdf/src/test/java/org/eclipse/rdf4j/sail/nativerdf/benchmark/SPARQLValuesClauseBenchmark.java +++ b/core/sail/nativerdf/src/test/java/org/eclipse/rdf4j/sail/nativerdf/benchmark/SPARQLValuesClauseBenchmark.java @@ -23,6 +23,7 @@ import org.eclipse.rdf4j.common.transaction.IsolationLevels; import org.eclipse.rdf4j.model.Model; import org.eclipse.rdf4j.model.util.ModelBuilder; +import org.eclipse.rdf4j.model.util.Values; import org.eclipse.rdf4j.model.vocabulary.OWL; import org.eclipse.rdf4j.model.vocabulary.RDF; import org.eclipse.rdf4j.model.vocabulary.RDFS; @@ -99,8 +100,10 @@ public void beforeClass() throws IOException, InterruptedException { repository = new SailRepository(new NativeStore(file, "spoc,posc,cspo,opsc")); - int numberOfItems = 10_000; - int numberOfChildren = 10_000; + int numberOfItems = 2; + int numberOfChildren = 2; + int numberOfTypeOwlClassStatements = 500; + int numberOfSubClassOfStatements = 10_000; try (var conn = repository.getConnection()) { conn.begin(IsolationLevels.NONE); @@ -129,6 +132,14 @@ public void beforeClass() throws IOException, InterruptedException { conn.add(m); } } + + } + for (int i = 0; i < numberOfTypeOwlClassStatements; i++) { + conn.add(Values.bnode(), RDF.TYPE, OWL.CLASS); + } + + for (int i = 0; i < numberOfSubClassOfStatements; i++) { + conn.add(Values.bnode(), RDFS.SUBCLASSOF, Values.bnode()); } conn.commit(); }