Skip to content
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

Correct swapped input/output and add error handling #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Virsacer
Copy link

Hi,
maxInputRate and maxOutputRate can be different so they should be used accordingly.
Also added some checks to prevent errors.

Copy link

codeautopilot bot commented Sep 26, 2024

PR summary

This Pull Request addresses a bug in the InterfaceSubsystem.pm file where the maxInputRate and maxOutputRate were incorrectly swapped in calculations. The changes ensure that the correct rate is used for input and output operations. Additionally, error handling has been improved by adding checks to prevent potential errors when maxInputRate or maxOutputRate are undefined or zero, ensuring robustness in performance data calculations.

Suggestion

Consider adding unit tests to verify that the changes correctly handle scenarios where maxInputRate or maxOutputRate are undefined or zero. This will help ensure that the error handling logic works as intended and prevent future regressions.

Disclaimer: This comment was entirely generated using AI. Be aware that the information provided may be incorrect.

Current plan usage: 0.73%

Have feedback or need help?
Discord
Documentation
[email protected]

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.

1 participant