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

[counterpoll] Display the correct default poll interval for watermark counters #2082

Merged
merged 2 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions counterpoll/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,13 @@ def show():
if rif_info:
data.append(["RIF_STAT", rif_info.get("POLL_INTERVAL", DEFLT_1_SEC), rif_info.get("FLEX_COUNTER_STATUS", DISABLE)])
if queue_wm_info:
data.append(["QUEUE_WATERMARK_STAT", queue_wm_info.get("POLL_INTERVAL", DEFLT_10_SEC), queue_wm_info.get("FLEX_COUNTER_STATUS", DISABLE)])
data.append(["QUEUE_WATERMARK_STAT", queue_wm_info.get("POLL_INTERVAL", DEFLT_60_SEC), queue_wm_info.get("FLEX_COUNTER_STATUS", DISABLE)])
if pg_wm_info:
data.append(["PG_WATERMARK_STAT", pg_wm_info.get("POLL_INTERVAL", DEFLT_10_SEC), pg_wm_info.get("FLEX_COUNTER_STATUS", DISABLE)])
data.append(["PG_WATERMARK_STAT", pg_wm_info.get("POLL_INTERVAL", DEFLT_60_SEC), pg_wm_info.get("FLEX_COUNTER_STATUS", DISABLE)])
if pg_drop_info:
data.append(['PG_DROP_STAT', pg_drop_info.get("POLL_INTERVAL", DEFLT_10_SEC), pg_drop_info.get("FLEX_COUNTER_STATUS", DISABLE)])
if buffer_pool_wm_info:
data.append(["BUFFER_POOL_WATERMARK_STAT", buffer_pool_wm_info.get("POLL_INTERVAL", DEFLT_10_SEC), buffer_pool_wm_info.get("FLEX_COUNTER_STATUS", DISABLE)])
data.append(["BUFFER_POOL_WATERMARK_STAT", buffer_pool_wm_info.get("POLL_INTERVAL", DEFLT_60_SEC), buffer_pool_wm_info.get("FLEX_COUNTER_STATUS", DISABLE)])
if acl_info:
data.append([ACL, pg_drop_info.get("POLL_INTERVAL", DEFLT_10_SEC), acl_info.get("FLEX_COUNTER_STATUS", DISABLE)])
if tunnel_info:
Expand Down
18 changes: 9 additions & 9 deletions tests/counterpoll_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

import counterpoll.main as counterpoll

expected_counterpoll_show = """Type Interval (in ms) Status
expected_counterpoll_show = """Type Interval (in ms) Status
-------------------- ------------------ --------
QUEUE_STAT 10000 enable
PORT_STAT 1000 enable
PORT_BUFFER_DROP 60000 enable
QUEUE_WATERMARK_STAT 10000 enable
PG_WATERMARK_STAT 10000 enable
PG_DROP_STAT 10000 enable
ACL 10000 enable
FLOW_CNT_TRAP_STAT 10000 enable
QUEUE_STAT 10000 enable
neethajohn marked this conversation as resolved.
Show resolved Hide resolved
PORT_STAT 1000 enable
PORT_BUFFER_DROP 60000 enable
QUEUE_WATERMARK_STAT default (60000) enable
PG_WATERMARK_STAT default (60000) enable
PG_DROP_STAT 10000 enable
ACL 10000 enable
FLOW_CNT_TRAP_STAT 10000 enable
"""

class TestCounterpoll(object):
Expand Down
2 changes: 0 additions & 2 deletions tests/mock_tables/config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1576,11 +1576,9 @@
"FLEX_COUNTER_STATUS": "enable"
},
"FLEX_COUNTER_TABLE|QUEUE_WATERMARK": {
"POLL_INTERVAL": "10000",
"FLEX_COUNTER_STATUS": "enable"
},
"FLEX_COUNTER_TABLE|PG_WATERMARK": {
"POLL_INTERVAL": "10000",
"FLEX_COUNTER_STATUS": "enable"
},
"FLEX_COUNTER_TABLE|PG_DROP": {
Expand Down