Skip to content

Commit

Permalink
Increase the watermark polling interval to 10s (sonic-net#777)
Browse files Browse the repository at this point in the history
* Increase the watermark polling interval to 10s

Signed-off-by: Wenda <wenni@microsoft.com>

* Update watermark test timing with 10s polling interval

Signed-off-by: Wenda <wenni@microsoft.com>
  • Loading branch information
wendani authored and lguohan committed Feb 2, 2019
1 parent a2b987b commit 73b620c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ extern BufferOrch *gBufferOrch;
#define DEFAULT_VLAN_ID 1
#define PORT_FLEX_STAT_COUNTER_POLL_MSECS "1000"
#define QUEUE_FLEX_STAT_COUNTER_POLL_MSECS "10000"
#define QUEUE_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "1000"
#define PG_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "1000"
#define QUEUE_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "10000"
#define PG_WATERMARK_FLEX_STAT_COUNTER_POLL_MSECS "10000"


static map<string, sai_port_fec_mode_t> fec_mode_map =
Expand Down
3 changes: 2 additions & 1 deletion tests/test_watermark.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class TestWatermark(object):

DEFAULT_TELEMETRY_INTERVAL = 120
NEW_INTERVAL = 5
DEFAULT_POLL_INTERVAL = 10

def enable_unittests(self, dvs, status):
db = swsscommon.DBConnector(swsscommon.ASIC_DB, dvs.redis_sock, 0)
Expand Down Expand Up @@ -57,7 +58,7 @@ def populate_asic_all(self, dvs, val):
self.populate_asic(dvs, "SAI_OBJECT_TYPE_QUEUE", SaiWmStats.queue_shared, val)
self.populate_asic(dvs, "SAI_OBJECT_TYPE_INGRESS_PRIORITY_GROUP", SaiWmStats.pg_shared, val)
self.populate_asic(dvs, "SAI_OBJECT_TYPE_INGRESS_PRIORITY_GROUP", SaiWmStats.pg_headroom, val)
time.sleep(1)
time.sleep(self.DEFAULT_POLL_INTERVAL)

def verify_value(self, dvs, obj_ids, table_name, watermark_name, expected_value):

Expand Down

0 comments on commit 73b620c

Please sign in to comment.