Conversation
* Extract get_metrics and add unit tests Refactor mounter.py to extract metric extraction into a static helper Mounter.get_metrics(columns, summaries). The new method builds a summary lookup to avoid nested loops, applies scalar-over-media precedence, filters non-SDK SYSTEM metrics, and uses -1 for keys with no summary. Also add comprehensive unit tests (test/unit/data/porter/test_mounter.py) covering basic behavior, precedence, missing summaries, system filtering (with mocking), error handling, and a large-scale performance check. * Parameterize large-scale metrics test Make TestMounterMetrics.test_get_metrics_large_scale accept a configurable `count` (default 1_000_000) and replace the local N variable with `count`. Remove debug print statements and update summaries/column generation to use the parameter, reducing noisy output and allowing the test size to be adjusted for different environments.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )