-
Notifications
You must be signed in to change notification settings - Fork 24
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
Count the number of throttled log message and print it. #1520
Open
ovalenti
wants to merge
6
commits into
master
Choose a base branch
from
ovalenti/count-throttled-logs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
ovalenti
force-pushed
the
ovalenti/count-throttled-logs
branch
from
July 4, 2024 15:54
cc4a658
to
f3e5456
Compare
ovalenti
force-pushed
the
ovalenti/count-throttled-logs
branch
from
July 4, 2024 16:24
925e2eb
to
f68248b
Compare
This is likely less efficient, but prevents warnings about ambiguous dangling else statement.
ovalenti
force-pushed
the
ovalenti/count-throttled-logs
branch
from
July 5, 2024 18:22
2b8fe96
to
5e68bb8
Compare
ovalenti
force-pushed
the
ovalenti/count-throttled-logs
branch
from
July 5, 2024 19:01
5e68bb8
to
fb917d9
Compare
openshift-ci
bot
added
do-not-merge/work-in-progress
and removed
do-not-merge/work-in-progress
labels
Jul 5, 2024
static std::chrono::steady_clock::time_point _clog_lastlog_##__LINE__; \ | ||
static unsigned long _clog_throttle_times_##__LINE__ = 0; \ | ||
std::chrono::duration _clog_elapsed_##__LINE__ = std::chrono::steady_clock::now() - _clog_lastlog_##__LINE__; \ | ||
if (collector::logging::CheckLogLevel(collector::logging::LogLevel::lvl) && (cond) && _clog_elapsed_##__LINE__ < interval) { \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not been able to refactor this to use nested ifs. I think this is okay.
JoukoVirtanen
approved these changes
Aug 1, 2024
I will approve after merge conflicts are fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We have recently increased significantly the delay for some throttled messages.
In order to get a better idea of the amount of messages, this PR adds a counter.
Checklist
inspected CI test results for throttled messages:
Testing
With a container generating 100 zombie processes, the collector contains: