Use tracemalloc for memory measurements.#5948
Merged
stephenworsley merged 3 commits intoSciTools:mainfrom May 16, 2024
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5948 +/- ##
=======================================
Coverage 89.78% 89.78%
=======================================
Files 93 93
Lines 23007 23007
Branches 5017 5017
=======================================
Hits 20657 20657
Misses 1620 1620
Partials 730 730 ☔ View full report in Codecov by Sentry. |
Contributor
⏱️ Performance Benchmark Report: a809e9aPerformance shiftsFull benchmark resultsGenerated by GHA run |
stephenworsley
requested changes
May 13, 2024
stephenworsley
approved these changes
May 16, 2024
Contributor
stephenworsley
left a comment
There was a problem hiding this comment.
After running the benchmarks in #5946, I'm satisfied that tracemalloc gives a more accurate view of memory for more cases than the current set up. It seems like there are still some potential difficulties with memory benchmarking for some parallelisation setups, but I don't believe any more problems are being introduced. Otherwise, I think this PR looks good to go.
Member
Author
|
Thanks @stephenworsley ! |
This was referenced May 17, 2024
stephenworsley
added a commit
to stephenworsley/iris
that referenced
this pull request
Jun 10, 2024
* main: (759 commits) Bump scitools/workflows from 2024.05.1 to 2024.06.0 (SciTools#5986) [pre-commit.ci] pre-commit autoupdate (SciTools#5980) Updated environment lockfiles (SciTools#5983) Bump scitools/workflows from 2024.05.0 to 2024.05.1 (SciTools#5984) Make `slices_over` tests go faster (SciTools#5973) Updated environment lockfiles (SciTools#5979) Update lock files with associated fixes (SciTools#5953) List 25 slowest tests (SciTools#5969) used a note to highlight some text (SciTools#5971) Lazy `iris.cube.Cube.rolling_window` (SciTools#5795) Add memory benchmarks (SciTools#5960) Whatsnew for several benchmark developments. (SciTools#5961) Remove "on-demand" from some benchmarks (SciTools#5959) Add bm_runner 'trialrun' subcommand. (SciTools#5957) Automatically install iris-test-data for benchmark data generation (SciTools#5958) Added benchmarks for collapse and aggregate (SciTools#5954) Use tracemalloc for memory measurements. (SciTools#5948) Provide a Nox `benchmarks` session as the recommended entry point (SciTools#5951) [pre-commit.ci] pre-commit autoupdate (SciTools#5952) Remove unit benchmarks (SciTools#5949) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #5947
Replaces the current process RSS ("resident set size") based mechanism.
See #5946 for info on how they compare.
N.B. this is hard to test, possibly only takes effect when merged ?
@trexfeathers can you advise? I'm a bit vague on this.