-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: flush queue before next event polling #18
Conversation
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.
Looks good, couple thoughts:
- Let's document that parameter in the
README.md
. - I think would be better to make it clearer in the env var name WHEN it flushes: something like
PYROSCOPE_FLUSH_ON_INVOKE
. Not too sold on this if we document it on the readme tbh.
main.go
Outdated
@@ -37,6 +37,8 @@ var ( | |||
|
|||
// profile the extension? | |||
selfProfiling = getEnvBool("PYROSCOPE_SELF_PROFILING") | |||
|
|||
flushRelayQueue = getEnvBool("PYROSCOPE_FLUSH_RELAY_QUEUE") |
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.
This is false
by default, my understanding is that this functionality has no clear downsides right? Shouldn't we make it true
by default?
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 downside is that it can increase lambda invocation time and as a result billing. I'd keep it disabled by default. But it is not super strong opinion, we can change to enabled by default.
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.
Ahh I see now, since flush is sync, it makes the time before waiting for new events longer, therefore making it more expensive.
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.
maybe good idea to rename Flush to FlushSync so it is more obvious
Co-authored-by: eduardo aleixo <eh-am@users.noreply.github.com>
No description provided.