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

[sonic_py_common] Cache Static Information in device_info to speed up CLI response #30

Closed
wants to merge 2 commits into from

Conversation

vivekrnv
Copy link
Owner

  • Why I did it
    Profiled the execution for the following cmd intfutil -c status

  • How I did it
    Cached the following information:

  1. get_sonic_version_info()
  2. get_platform_info()
    None of the API exposed to the user libraries (for eg: sonic-utilities) has been modified
    These methods involve reading text files or from redis. Thus, caching helped to improve the execution time
  • How to verify it
    Added UT's.
    Verified on the device

Signed-off-by: Vivek Reddy Karri vkarri@nvidia.com

Why I did it

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

vivekrnv and others added 2 commits August 29, 2022 02:24
… CLI response (sonic-net#11696)

- Why I did it
Profiled the execution for the following cmd intfutil -c status

- How I did it
Cached the following information:
1. get_sonic_version_info()
2. get_platform_info()
None of the API exposed to the user libraries (for eg: sonic-utilities) has been modified
These methods involve reading text files or from redis. Thus, caching helped to improve the execution time

- How to verify it
Added UT's.
Verified on the device

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
@vivekrnv vivekrnv marked this pull request as ready for review August 29, 2022 04:18
@vivekrnv vivekrnv closed this Aug 29, 2022
vivekrnv added a commit that referenced this pull request Mar 30, 2023
67a3bdf show counters wrong cli output fixed (#36)
5b3eea1 Update package cache, and bail on the first error (#35)
1d221b0 dhcpv6 relay UT code coverage improve (#32)
514b084 dhcpv6 packet handling code refine (#30)

Signed-off-by: Vivek Reddy <vkarri@nvidia.com>
@vivekrnv vivekrnv deleted the device_info_cache_2205 branch September 19, 2023 04:24
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