File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
benchmarks/src/test/java/org/elasticsearch/benchmark/vector Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ public static void skipWindows() {
3232 assumeFalse ("doesn't work on windows yet" , Constants .WINDOWS );
3333 }
3434
35+ static boolean supportsHeapSegments () {
36+ return Runtime .version ().feature () >= 22 ;
37+ }
38+
3539 public void testDotProduct () {
3640 for (int i = 0 ; i < 100 ; i ++) {
3741 var bench = new JDKVectorInt7uBenchmark ();
@@ -40,8 +44,10 @@ public void testDotProduct() {
4044 try {
4145 float expected = dotProductScalar (bench .byteArrayA , bench .byteArrayB );
4246 assertEquals (expected , bench .dotProductLucene (), delta );
43- assertEquals (expected , bench .dotProductNativeWithHeapSeg (), delta );
4447 assertEquals (expected , bench .dotProductNativeWithNativeSeg (), delta );
48+ if (supportsHeapSegments ()) {
49+ assertEquals (expected , bench .dotProductNativeWithHeapSeg (), delta );
50+ }
4551 } finally {
4652 bench .teardown ();
4753 }
You can’t perform that action at this time.
0 commit comments