From 536af404dae2935c8db930b75ee56bbbffe13f34 Mon Sep 17 00:00:00 2001 From: noaOrMlnx <58519608+noaOrMlnx@users.noreply.github.com> Date: Thu, 2 Sep 2021 07:09:26 +0300 Subject: [PATCH] Fix flex counters logic of converting poll interval to seconds from MS (#878) According to https://github.com/Azure/SONiC/blob/ec6d35dd2c28491bfade19cfee990fe612f1e5e9/doc/rates-and-utilization/Rates_and_utilization_HLD.md, counterpoll command gives polling interval in milliseconds. So when converting them to seconds to be supplied to lua script this should be divide by 1000. However, syncd multiplies it by 1000. Changed the multiplication to none, and did the converting in lua script - https://github.com/Azure/sonic-swss/pull/1855 Fixed issue - https://github.com/Azure/sonic-buildimage/issues/8392 --- syncd/FlexCounter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncd/FlexCounter.cpp b/syncd/FlexCounter.cpp index 36d76c003c16..fd132b5368a0 100644 --- a/syncd/FlexCounter.cpp +++ b/syncd/FlexCounter.cpp @@ -1596,7 +1596,7 @@ void FlexCounter::runPlugins( { std::to_string(counters_db.getDbId()), COUNTERS_TABLE, - std::to_string(m_pollInterval * 1000) + std::to_string(m_pollInterval) }; std::vector portList;