Skip to content

Reduce the time spend in StringMemoryTest #23158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

aschwaighofer
Copy link
Contributor

Measure the increase.

rdar://problem/48658000

Measure the increase.
rdar://problem/48658000
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@aschwaighofer
Copy link
Contributor Author

#23146

@inline(never)
func getMemoryUsage() -> Int {
var usage = rusage()
getrusage(RUSAGE_SELF, &usage)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wont work on Windows, and should use GetProcessMemoryInfo there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a new test - the PR just moves this code within the test.

I think this test is disabled on windows by requiring: // REQUIRES: objc_interop

@aschwaighofer aschwaighofer merged commit d6eb168 into swiftlang:master Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants