[K/N] Make a stress test faster with aggressive GC
This commit is contained in:
committed by
Space Team
parent
61f404e493
commit
22a3000789
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user