Skip to content

Commit 019d5de

Browse files
committed
performance improvements
1 parent 799a2ad commit 019d5de

6 files changed

Lines changed: 1781 additions & 555 deletions

File tree

‎Coretests.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
CORETESTS_BUILD_SCHEMA = "coretests-build-v2"
4242
MAX_BUILD_CACHE_ENTRIES = 2
4343
HARNESS_STARTUP_GRACE_SECONDS = 15.0
44-
CORETESTS_MAX_HEAP = "1g"
44+
# Coretests is a short allocation-heavy throughput workload; a larger young
45+
# generation avoids hundreds of collections without approaching CI limits.
46+
CORETESTS_MAX_HEAP = "2g"
4547
DEFAULT_IGNORED_TESTS = {
4648
"char::at_most_one_case": (
4749
"exhaustive Unicode case validation takes over seventy-five CPU-seconds"
@@ -382,6 +384,7 @@ def listed_tests(jar: Path, timeout: float, *, ignored: bool = False) -> list[st
382384
command = [
383385
"java",
384386
f"-Xmx{CORETESTS_MAX_HEAP}",
387+
"-XX:+UseParallelGC",
385388
"-jar",
386389
str(jar),
387390
"--list",
@@ -449,6 +452,7 @@ def run_test_harness(
449452
command = [
450453
"java",
451454
f"-Xmx{CORETESTS_MAX_HEAP}",
455+
"-XX:+UseParallelGC",
452456
"-jar",
453457
str(jar),
454458
"--format",
@@ -648,8 +652,8 @@ def main() -> int:
648652
"-j",
649653
"--jobs",
650654
type=int,
651-
default=1,
652-
help="libtest worker threads (defaults to 1 to avoid pointer-allocation GC thrashing)",
655+
default=min(os.cpu_count() or 1, 4),
656+
help="Cargo and libtest worker threads (defaults to the smaller of CPU count and 4)",
653657
)
654658
parser.add_argument(
655659
"--timeout",

0 commit comments

Comments
 (0)