8000 switchport status and config command improvement by 15 times by vikumarks · Pull Request #9 · vikumarks/sonic-utilities · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

switchport status and config command improvement by 15 times #9

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

Conversation

vikumarks
Copy link
Owner

What I did

Optimize the code, getting 15 times performance improvement

How I did it

How to verify it

time show int switchport config

Previous command output (if the output of a command-line utility has changed)

admin@str-7060x6-64pe-stress-01:~$ time show int switchport config
Interface    Mode    Untagged    Tagged
-----------  ------  ----------  --------
Ethernet0    routed  2
Ethernet1    routed  2
Ethernet16   routed
Ethernet17   routed
...
....

Ethernet112  routed  2
....
.....
Ethernet499  routed
Ethernet500  routed              2
Ethernet501  routed
Ethernet502  routed
Ethernet503  routed
Ethernet512  routed
Ethernet513  routed

real    0m12.485s
user    0m5.013s
sys     0m2.697s
admin@str-7060x6-64pe-stress-01:~$

New command output (if the output of a command-line utility has changed)

admin@sonic-s6100-dut1:~$ time show int switchport config
Interface    Mode    Untagged    Tagged
-----------  ------  ----------  --------
Ethernet0    routed  2
Ethernet1    routed  2
Ethernet16   routed
Ethernet17   routed
...
....

Ethernet112  routed  2
....
.....
Ethernet499  routed
Ethernet500  routed              2
Ethernet501  routed
Ethernet502  routed
Ethernet503  routed
Ethernet512  routed
Ethernet513  routed

real    0m0.824s
user    0m0.512s
sys     0m0.195s
admin@sonic-s6100-dut1:~$

@vikumarks vikumarks merged commit 86f88df into pr-show-int-switchport-config-performance-improvement May 20, 2025
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
0