Skip to content

Commit 7d4b72f

Browse files
authored
Merge pull request #23152 from apple/revert-23146-string-memory-test-faster
Revert "[StringMemoryTest] Reduce # of iterations down to 1M and lower memory threshold"
2 parents 18c7e6a + 98ad5a4 commit 7d4b72f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

validation-test/stdlib/StringMemoryTest.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func lowercase(_ str: String) -> String {
3333
/// Make sure the hash function does not leak.
3434

3535
let dict = [ "foo" : 1]
36-
for _ in 0 ..< 1_000_000 {
36+
for _ in 0 ..< 10_000_000 {
3737
if lookup("\u{1F1E7}\u{1F1E7}", dict) {
3838
print("Found?!")
3939
}
@@ -56,9 +56,9 @@ getrusage(RUSAGE_SELF, &usage)
5656
// CHECK: success
5757
// CHECK-NOT: failure
5858

59-
// We should not need 10MB for this.
60-
if usage.ru_maxrss > 10 * 1024 * 1024 {
61-
print("failure - should not need 10MB!")
59+
// We should not need 50MB for this.
60+
if usage.ru_maxrss > 50 * 1024 * 1024 {
61+
print("failure - should not need 50MB!")
6262
} else {
6363
print("success")
6464
}

0 commit comments

Comments
 (0)