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

[cmis] Optimize cmis.get_error_description speed for passive module #31

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

Conversation

Junchao-Mellanox
Copy link
Owner

@Junchao-Mellanox Junchao-Mellanox commented Dec 11, 2024

Description

cmis.get_error_description is very slow for passive module:

>>> begin = time.time()
>>> s.get_error_description()
'ModuleLowPwr'
>>> print(time.time() - begin)
2.905252695083618

For a module that has flat memory, it does not need check data path state. Because of this issue, show error-status --fetch-from-hardware takes very long time if there is many passive module present:

real    1m12.116s
user    0m5.852s
sys     0m15.491s

After the fix, it changes to:

real    0m1.051s
user    0m0.499s
sys     0m0.059s

Motivation and Context

Optimize cmis.get_error_description for passive module

How Has This Been Tested?

Manual test
Unit test

Additional Information (Optional)

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