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

[SAI-PTF] add invocation logger #1651

Merged

Conversation

richardyu-ms
Copy link
Collaborator

Add invocation logger for all the method in sai_adapter.
Add test cases for check the template function

the log looks like

11/14/2022 01:10:07 PM - test/sai_test/sai_sanity_test.py:SaiSanityTest - sai_adapter.py - INFO - sai_adapter_invoke func:[sai_thrift_create_switch] args: [{'client': <sai_thrift.sai_rpc.Client object at 0x7f3beebb27f0>, 'init_switch': True, 'src_mac_address': '00:77:66:55:44:00'}]

Test done:
unit test
dut test

@richardyu-ms richardyu-ms force-pushed the add_logger_master branch 2 times, most recently from f7c40db to 3fc25f4 Compare November 14, 2022 13:32
Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Nov 14, 2022

This pull request introduces 3 alerts when merging 419adcc into 63ed97e - view on LGTM.com

new alerts:

  • 2 for Use of 'global' at module level
  • 1 for First parameter of a method is not named 'self'

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Nov 15, 2022

This pull request introduces 7 alerts when merging 9723951 into 63ed97e - view on LGTM.com

new alerts:

  • 4 for Unused import
  • 2 for Unused local variable
  • 1 for First parameter of a method is not named 'self'

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

@richardyu-ms richardyu-ms merged commit 8be042a into opencomputeproject:master Nov 16, 2022
richardyu-ms added a commit that referenced this pull request Nov 20, 2022
* add invocation logger

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* reformat code

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
Co-authored-by: richardyu <richardyu@contoso.com>
richardyu-ms added a commit that referenced this pull request Nov 20, 2022
[Cherry-pick][SAI-PTF]cherry pick fixed from master(#1651)(#1656)
richardyu-ms added a commit to richardyu-ms/SAI that referenced this pull request Nov 20, 2022
* add invocation logger

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* reformat code

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
richardyu-ms added a commit that referenced this pull request Nov 20, 2022
* add invocation logger

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* reformat code

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
richardyu-ms added a commit to richardyu-ms/sonic-sairedis that referenced this pull request Nov 23, 2022
cherry-pick from sonic-net#1155

Advance SAI head pointer

[SAI-PTF]add conditional import for unit test opencomputeproject/SAI#1656
[SAI-PTF] add invocation logger opencomputeproject/SAI#1651
[SAI-PTF]Include sai expermential for generate the rpc headers opencomputeproject/SAI#1660
Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
richardyu-ms added a commit to sonic-net/sonic-sairedis that referenced this pull request Nov 23, 2022
cherry-pick from #1155

Advance SAI head pointer

[SAI-PTF]add conditional import for unit test opencomputeproject/SAI#1656
[SAI-PTF] add invocation logger opencomputeproject/SAI#1651
[SAI-PTF]Include sai expermential for generate the rpc headers opencomputeproject/SAI#1660
Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
@richardyu-ms richardyu-ms deleted the add_logger_master branch January 16, 2023 10:53
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