Skip to content
Open
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
2 changes: 1 addition & 1 deletion jena-benchmarks/jena-benchmarks-jmh/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.jena</groupId>
<artifactId>jena-benchmarks</artifactId>
<version>6.1.0</version>
<version>6.2.0-SNAPSHOT</version>
</parent>

<name>Apache Jena - Benchmarks JMH</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.jena.atlas.iterator.ActionCount;
import org.apache.jena.jmh.JmhDefaultOptions;

import org.apache.jena.mem.collection.Sized;
import org.junit.Assert;
import org.junit.Test;

Expand Down Expand Up @@ -75,12 +76,18 @@ public Spliterator<Object> createSut(Object[] arrayWithNulls, int elementsCount)
if (count != elementsCount) {
throw new RuntimeException("Concurrent modification detected");
}
} ;
final var sized = new Sized() {
@Override
public int size() {
return elementsCount;
}
};
return switch (param1_iteratorImplementation) {
case "memvalue.SparseArraySpliterator" ->
new org.apache.jena.memvalue.SparseArraySpliterator<>(arrayWithNulls, count, checkForConcurrentModification);
case "mem2.SparseArraySpliterator" ->
new SparseArraySpliterator<>(arrayWithNulls, checkForConcurrentModification);
new SparseArraySpliterator<>(arrayWithNulls, sized);
default ->
throw new IllegalArgumentException("Unknown spliterator implementation: " + param1_iteratorImplementation);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.jena.atlas.iterator.ActionCount;
import org.apache.jena.jmh.JmhDefaultOptions;

import org.apache.jena.mem.collection.Sized;
import org.junit.Assert;
import org.junit.Test;

Expand Down Expand Up @@ -77,11 +78,17 @@ public Spliterator<Object> createSut(Object[] arrayWithNulls, int elementsCount)
throw new RuntimeException("Concurrent modification detected");
}
};
final var sized = new Sized() {
@Override
public int size() {
return elementsCount;
}
};
return switch (param1_iteratorImplementation) {
case "memvalue.SparseArraySpliterator" ->
new org.apache.jena.memvalue.SparseArraySpliterator<>(arrayWithNulls, count, checkForConcurrentModification);
case "mem2.SparseArraySpliterator" ->
new SparseArraySpliterator<>(arrayWithNulls, checkForConcurrentModification);
new SparseArraySpliterator<>(arrayWithNulls, sized);
default ->
throw new IllegalArgumentException("Unknown spliterator implementation: " + param1_iteratorImplementation);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.jena.atlas.iterator.ActionCount;
import org.apache.jena.jmh.JmhDefaultOptions;

import org.apache.jena.mem.collection.Sized;
import org.junit.Assert;
import org.junit.Test;

Expand Down Expand Up @@ -78,11 +79,17 @@ public Spliterator<Object> createSut(Object[] arrayWithNulls, int elementsCount)
throw new RuntimeException("Concurrent modification detected");
}
};
final var sized = new Sized() {
@Override
public int size() {
return elementsCount;
}
};
return switch (param1_iteratorImplementation) {
case "memvalue.SparseArraySpliterator" ->
new org.apache.jena.memvalue.SparseArraySpliterator<>(arrayWithNulls, count, checkForConcurrentModification);
case "mem2.SparseArraySpliterator" ->
new SparseArraySpliterator<>(arrayWithNulls, checkForConcurrentModification);
new SparseArraySpliterator<>(arrayWithNulls, sized);
default ->
throw new IllegalArgumentException("Unknown spliterator implementation: " + param1_iteratorImplementation);
};
Expand Down
2 changes: 1 addition & 1 deletion jena-benchmarks/jena-benchmarks-shadedJena560/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.jena</groupId>
<artifactId>jena-benchmarks</artifactId>
<version>6.1.0</version>
<version>6.2.0-SNAPSHOT</version>
</parent>

<name>Apache Jena - Benchmarks Shaded Jena 5.6.0</name>
Expand Down
2 changes: 1 addition & 1 deletion jena-benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.jena</groupId>
<artifactId>jena</artifactId>
<version>6.1.0</version>
<version>6.2.0-SNAPSHOT</version>
</parent>

<name>Apache Jena - Benchmark Suite</name>
Expand Down
Loading