[K/N] Make a stress test faster with aggressive GC

This commit is contained in:
Alexander Shabalin
2023-08-01 14:59:07 +02:00
committed by Space Team
parent 61f404e493
commit 22a3000789
2 changed files with 9 additions and 1 deletions
@@ -5616,6 +5616,9 @@ if (isAppleTarget(project)) {
sources = ['framework/kt56233']
}
swiftSources = ['framework/kt56233']
if (isAggressiveGC) {
swiftExtraOpts += ["-D", "AGGRESSIVE_GC"]
}
}
frameworkTest("testKt57791Framework") {
@@ -27,8 +27,13 @@ func launchThreads(
}
func kt56233() {
#if AGGRESSIVE_GC
let count = 50_000
#else
let count = 50_000_000
#endif
// Stress testing for race conditions.
for _ in 0..<50000000 {
for _ in 0..<count {
_ = Kt56233.SimpleEnum.two.ordinal
}
}