open-traffic-generator / ixia-c

Ixia-c Traffic Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FlowMetrics rate reporting is not multi-thread safe

bortok opened this issue · comments

When calling api.GetMetrics(mr) from multiple go routines (all running as part of waitGroup) the values returned for frames_rx_rate/frames_tx_rate fluctuate between actual rates and 0. This doesn't happen when there is only main thread calling api.GetMetrics(mr).

See this branch to repeat: https://github.com/OpenIxia/otg-demo/tree/getMetricsMultithread/clab/rtbh

Example output is attached
multithread.txt