Skip to content

Commit d75c201

Browse files
committed
fix benchmark
1 parent 7bd0ef6 commit d75c201

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Samples/JExtractJNISampleApp/src/jmh/java/com/example/swift/EnumBenchmark.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 20245Apple Inc. and the Swift.org project authors
5+
// Copyright (c) 2025 Apple Inc. and the Swift.org project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
@@ -18,6 +18,7 @@
1818
import org.openjdk.jmh.infra.Blackhole;
1919
import org.swift.swiftkit.core.ClosableSwiftArena;
2020
import org.swift.swiftkit.core.ConfinedSwiftMemorySession;
21+
import org.swift.swiftkit.core.SwiftArena;
2122

2223
import java.util.ArrayList;
2324
import java.util.List;
@@ -39,7 +40,7 @@ public static class BenchmarkState {
3940

4041
@Setup(Level.Trial)
4142
public void beforeAll() {
42-
arena = new ConfinedSwiftMemorySession();
43+
arena = SwiftArena.ofConfined();
4344
vehicle = Vehicle.motorbike("Yamaha", 900, OptionalInt.empty(), arena);
4445
}
4546

0 commit comments

Comments
 (0)