Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Evidence:
Command: python3 .codex/skills/mvnf/scripts/mvnf.py Class#method (preferred) OR mvn -o -Dmaven.repo.local=.m2_repo -pl <module> -Dtest=Class#method verify
Report: <module>/target/surefire-reports/<file>.txt
Snippet:
\<copy 10–30 lines capturing the failure or success summary>
\<copy 1–30 lines capturing the failure or success summary>
```

**Routine B additions**
Expand Down Expand Up @@ -429,6 +429,7 @@ Always keep untracked artifacts!
3. **Migration/rename/autogen refresh** where behavior is already characterized by existing tests.
4. **Build/CI/docs/logging/message changes** that do not alter runtime behavior or asserted outputs.
5. **Data/resource tweaks** not asserted by tests and not affecting behavior.
6. **Benchmark-only changes** (benchmark sources, harness scripts, or benchmark data) that do not alter production behavior.

### Routine B Gates (all must pass)
- **Neutrality/Scope:** No externally observable behavior change. Localized edit.
Expand Down
6 changes: 6 additions & 0 deletions compliance/model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
<version>${jmhVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-benchmark-common</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-model-testsuite</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Some portions generated by Codex

package org.eclipse.rdf4j.model.util;

Expand All @@ -17,6 +18,7 @@
import java.util.List;
import java.util.concurrent.TimeUnit;

import org.eclipse.rdf4j.benchmark.common.BenchmarkResources;
import org.eclipse.rdf4j.model.Model;
import org.eclipse.rdf4j.model.Statement;
import org.eclipse.rdf4j.model.impl.TreeModel;
Expand Down Expand Up @@ -55,15 +57,15 @@ public class IsomorphicBenchmark {
private final Model longChain = getModel("longChain.ttl");
private final Model sparqlTestCase = getModel("sparqlTestCase.ttl");
private final Model spinFullForwardchained = getModel("spin-full-forwardchained.ttl");
private final Model bsbm = getModel("bsbm-100.ttl");
private final Model bsbmChanged = getModel("bsbm-100-changed.ttl");
private final Model bsbm = getModel("bsbm-100.ttl.gz");
private final Model bsbmChanged = getModel("bsbm-100-changed.ttl.gz");
private final List<Statement> bsbm_arraylist = new ArrayList<>(bsbm);
private final Model bsbmTree = new TreeModel(bsbm);
private final Model list = getModel("list.ttl");
private final Model internallyIsomorphic = getModel("internallyIsomorphic.ttl");
private final Model manyProperties = getModel("manyProperties.ttl");
private final Model manyProperties2 = getModel("manyProperties2.ttl");
private final Model uuid = getModel("uuid.ttl");
private final Model uuid = getModel("uuid.ttl.gz");

private final Model empty_2 = getModel("empty.ttl");
private final Model blankNodes_2 = getModel("blankNodes.ttl");
Expand All @@ -74,14 +76,14 @@ public class IsomorphicBenchmark {
private final Model longChain_2 = getModel("longChain.ttl");
private final Model sparqlTestCase_2 = getModel("sparqlTestCase.ttl");
private final Model spinFullForwardchained_2 = getModel("spin-full-forwardchained.ttl");
private final Model bsbm_2 = getModel("bsbm-100.ttl");
private final Model bsbm_2 = getModel("bsbm-100.ttl.gz");
private final List<Statement> bsbm_arraylist_2 = new ArrayList<>(bsbm);
private final Model bsbmTree_2 = new TreeModel(bsbm);
private final Model list_2 = getModel("list.ttl");
private final Model internallyIsomorphic_2 = getModel("internallyIsomorphic.ttl");
private final Model manyProperties_2 = getModel("manyProperties.ttl");
private final Model manyProperties2_2 = getModel("manyProperties2.ttl");
private final Model uuid_2 = getModel("uuid.ttl");
private final Model uuid_2 = getModel("uuid.ttl.gz");

public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder().include("IsomorphicBenchmark.*")
Expand Down Expand Up @@ -275,9 +277,15 @@ public boolean bsbmNotIsomorphic() {

private Model getModel(String name) {
try {
try (InputStream resourceAsStream = IsomorphicBenchmark.class.getClassLoader()
.getResourceAsStream("benchmarkFiles/" + name)) {
return Rio.parse(resourceAsStream, "http://example.com/", RDFFormat.TURTLE);
InputStream resourceAsStream;
if (name.endsWith(".gz")) {
resourceAsStream = BenchmarkResources.openDecompressedStream("benchmarkFiles/" + name);
} else {
resourceAsStream = IsomorphicBenchmark.class.getClassLoader()
.getResourceAsStream("benchmarkFiles/" + name);
}
try (InputStream inputStream = resourceAsStream) {
return Rio.parse(inputStream, "http://example.com/", RDFFormat.TURTLE);
}
} catch (IOException e) {
throw new RuntimeException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/
// Some portions generated by Codex

package org.eclipse.rdf4j.model.util;

Expand All @@ -19,6 +20,7 @@
import java.util.ArrayList;
import java.util.List;

import org.eclipse.rdf4j.benchmark.common.BenchmarkResources;
import org.eclipse.rdf4j.model.Model;
import org.eclipse.rdf4j.model.Statement;
import org.eclipse.rdf4j.model.impl.TreeModel;
Expand Down Expand Up @@ -67,8 +69,8 @@ public static void beforeClass() {
longChain = getModel("longChain.ttl");
sparqlTestCase = getModel("sparqlTestCase.ttl");
spinFullForwardchained = getModel("spin-full-forwardchained.ttl");
bsbm = getModel("bsbm-100.ttl");
bsbmChanged = getModel("bsbm-100-changed.ttl");
bsbm = getModel("bsbm-100.ttl.gz");
bsbmChanged = getModel("bsbm-100-changed.ttl.gz");
bsbm_arraylist = new ArrayList<>(bsbm);
bsbmTree = new TreeModel(bsbm);
list = getModel("list.ttl");
Expand All @@ -82,7 +84,7 @@ public static void beforeClass() {
longChain_2 = getModel("longChain.ttl");
sparqlTestCase_2 = getModel("sparqlTestCase.ttl");
spinFullForwardchained_2 = getModel("spin-full-forwardchained.ttl");
bsbm_2 = getModel("bsbm-100.ttl");
bsbm_2 = getModel("bsbm-100.ttl.gz");
bsbm_arraylist_2 = new ArrayList<>(bsbm);
bsbmTree_2 = new TreeModel(bsbm);
list_2 = getModel("list.ttl");
Expand Down Expand Up @@ -255,9 +257,15 @@ public void testIsomorphicDatatype() throws Exception {

private static Model getModel(String name) {
try {
try (InputStream resourceAsStream = IsomorphicTest.class.getClassLoader()
.getResourceAsStream("benchmarkFiles/" + name)) {
return Rio.parse(resourceAsStream, "http://example.com/", RDFFormat.TURTLE);
InputStream resourceAsStream;
if (name.endsWith(".gz")) {
resourceAsStream = BenchmarkResources.openDecompressedStream("benchmarkFiles/" + name);
} else {
resourceAsStream = IsomorphicTest.class.getClassLoader()
.getResourceAsStream("benchmarkFiles/" + name);
}
try (InputStream inputStream = resourceAsStream) {
return Rio.parse(inputStream, "http://example.com/", RDFFormat.TURTLE);
}
} catch (IOException e) {
throw new RuntimeException(e);
Expand Down
Loading
Loading