mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[StringMemoryTest] Reduce # of iterations down to 1M and lower memory threshold
This test is taking way too long. Cut down on the number of iterations from 10M to 1M.
This commit is contained in:
@@ -33,7 +33,7 @@ func lowercase(_ str: String) -> String {
|
||||
/// Make sure the hash function does not leak.
|
||||
|
||||
let dict = [ "foo" : 1]
|
||||
for _ in 0 ..< 10_000_000 {
|
||||
for _ in 0 ..< 1_000_000 {
|
||||
if lookup("\u{1F1E7}\u{1F1E7}", dict) {
|
||||
print("Found?!")
|
||||
}
|
||||
@@ -56,9 +56,9 @@ getrusage(RUSAGE_SELF, &usage)
|
||||
// CHECK: success
|
||||
// CHECK-NOT: failure
|
||||
|
||||
// We should not need 50MB for this.
|
||||
if usage.ru_maxrss > 50 * 1024 * 1024 {
|
||||
print("failure - should not need 50MB!")
|
||||
// We should not need 10MB for this.
|
||||
if usage.ru_maxrss > 10 * 1024 * 1024 {
|
||||
print("failure - should not need 10MB!")
|
||||
} else {
|
||||
print("success")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user