-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Extend #[bench] with memory usage #22666
Comments
#[bench]
with memory usage
I was a bit surprised that this isn't already done – especially in light of the fact that rust programs in publicized benchmarks appear to indulge in a bit more memory than corresponding C programs. Looking at memory consumption is also usually the first thing I do when trying to optimize code, and if the runtime is similar, I will take the solution which uses less memory. Reducing memory usage can lead to performance benefits elsewhere because of cache effects. By the way, jemalloc has the Also hijacking this issue a bit, would it be feasible to include |
Memory would be nice. Then we can have teamcity service messages pushing out the stat so that it can be nicely graphed against commit history. (With #43381 ) |
I would love to see a PR to show memory usage information in #[bench]. |
Yup, this would be great. Although since jemalloc usage is no longer universal, it would be a bit more difficult than it used to be. |
Serve has a library for easy query of heap size at here (Though they have switched to an internal tool Jemalloc, which Rust uses by default, has support for monitoring memory usage. I think it is a nice and feasible component to be added into the standard library, not only |
It would be nice to be able to see memory usage (and memory leak) in
#[bench]
tests to detect regressions. I guess jemalloc can do that with something likeje_malloc_stats_print
.cc #14119
cc #14875
cc #19776
The text was updated successfully, but these errors were encountered: