fix bug in frequency string parsing#325
Merged
Merged
Conversation
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug in frequency string parsing by renaming and updating the conversion function used to convert hex strings into decimal values.
- Renames convertMsrToDecimals to convertHexStringToDecimals with clearer documentation and proper input handling.
- Updates all call sites in the file to use the new function for both bucket core counts and ISA frequency extraction.
Files not reviewed (1)
- version.txt: Language not supported
Comments suppressed due to low confidence (1)
internal/report/table_helpers.go:220
- The error message still refers to 'msr' even though the variable is now 'hexStr'. Consider updating the error message to 'no hex values found in hex string' for clarity.
err = fmt.Errorf("no hex values found in msr")
echiugoog
pushed a commit
to echiugoog/PerfSpect
that referenced
this pull request
May 21, 2025
* add a couple table helper tests * more refactoring and unit testing Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * common targets tests and refactoring Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * add unit tests for GetUserPath function in MockLocalTarget Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * refactor: streamline option parsing in parseMountOutput and update tests for CPU list expansion Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * refactor: rename MSR functions to Hex and update related tests Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * section parsing refactor and unit test Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * validate lock command duration flag Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * strip linefeed from end of filename Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * validate telemetry interval flag Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * always print set epb message in config Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * refactor config command Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * reformat flag and group definition Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * consistent error reporting from config's set commands Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * typo in string Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> * consistent output messages from set funcs in config Signed-off-by: Harper, Jason M <jason.m.harper@intel.com> --------- Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
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.
No description provided.