Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fix adds sandesh systemlog message throttling support.
We are throttling the message on the send side with a circular buffer of certail value. The size of the buffer would be the messages/second that can be sent by the application. If application sends more messages than the configured rate, it will be dropped and a syslog message is recorded for each overshoot.Following logic is added in the send part for both c++ and python: 1. Record the current time in curr_time 2. If CB is full: 2.1. Compare time of the next free buffer with current time 2.2. If difference is more than a sec, then enque else drop 3. enqueue in CB Currently the CB size cannot be changed midway Partial-Bug: 1469414 Conflicts: library/common/sandesh.sandesh library/common/sandesh_uve.sandesh library/cpp/sandesh_statistics.cc library/cpp/test/sandesh_message_test.cc library/python/pysandesh/sandesh_stats.py Change-Id: I2817ed643f1cd02ca916332c0d4f09e3f7b5f2c5
- Loading branch information
Showing
9 changed files
with
375 additions
and
32 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters