Skip to content
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

WIP: skip loop if periodicity says not to flush yet. #486

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

astuyve
Copy link
Contributor

@astuyve astuyve commented Nov 28, 2024

Waiting for the platformRuntimeDone event has a floor of 25ms. For very fast functions, we can slow them down even when we won't flush.

This removes that limitation, and allows events to buffer in the event bus until we decide at the top of an invocation that we'll be flushing.

This is a work in progress and cannot ship as is, because I'm statically setting the number of invocations to buffer. Instead the invocation context buffer needs to be refactored entirely.

I suggest dropping the enhanced metrics entirely from the invocation context tracker as we can increment/set metrics without knowing which invocation they belong to (as was the previous implementation). The invocation buffer is meant to simply hold enough data to create certain spans when needed or set certain metrics like timeouts/ooms. We should store only what we need here, instead of using it as a general purpose invocation tracker

But it does help very busy functions like this one in an infinite loop:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant