This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
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.
Make inflight background metrics more efficient. #7597
Make inflight background metrics more efficient. #7597
Changes from 2 commits
0a7091e
5b5a6a5
60783b3
ae630f3
fa5d4bf
faee73c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
So does this run on every batch, or just when the process stops (runs out of things to process) and then starts up again?
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.
The naming is a bit confusing here. Basically
LoggingContext.{__enter__,__exit__}
are called first time we enter the context and last time we leave the context, while{start,stop}
get called whenever the logging context starts/stops being the active/current logging context. (The namesresume
andpause
might have been better here)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.
Ok, and "entering the context" occurs each time a background processes starts processing.
So
_background_processes_active_since_last_scrape
contains just those processes that have become active since the last scrape, versus those that are continuously active.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.
Yup, exactly
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.
Could you add a quick comment to where
_background_process_in_flight_count
is instantiated mentioning this distinction please?