Skip to content

fix bug in frequency string parsing#325

Merged
harp-intel merged 2 commits into
mainfrom
prep361
Apr 29, 2025
Merged

fix bug in frequency string parsing#325
harp-intel merged 2 commits into
mainfrom
prep361

Conversation

@harp-intel
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel requested a review from Copilot April 29, 2025 00:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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")

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel merged commit 4282e57 into main Apr 29, 2025
4 checks passed
@harp-intel harp-intel deleted the prep361 branch April 29, 2025 00:25
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>
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