Skip to content

feat(profiling): buffer chunks before sending - #2281

Merged
Litarnus merged 2 commits into
continuous-profiling-14-release-roots-on-end-contextfrom
continuous-profiling-15-deferred-chunks
Oct 29, 2026
Merged

Litarnus merged 2 commits into
continuous-profiling-14-release-roots-on-end-contextfrom
continuous-profiling-15-deferred-chunks

Conversation

@Litarnus

@Litarnus Litarnus commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Buffers chunks instead of sending them from the callback directly. This has multiple reasons:

  • The callback is size based and can happen at any time, introducing http latency randomly. Excimer collapses idle blocks into one frame so 6060 frames can be longer than 60s which means it would send multiple requests
  • It's executed from the excimer interrupt, which might cause crashes in Swoole because the code does not pertain to any coroutine

It will keep 10 chunks at most and will drop oldest. We don't have a nice mechanism to auto flush, as the signal is made in the callback. Manual flushing is required unless in trace mode

@Litarnus
Litarnus added this pull request to stack #2282 October 17, 2026 23:16
@Litarnus
Litarnus force-pushed the continuous-profiling-15-deferred-chunks branch from 123a9e4 to 5c45951 Compare October 18, 2026 10:45

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/Profiling/ContinuousProfiler.php Resolved
@Litarnus
Litarnus force-pushed the continuous-profiling-15-deferred-chunks branch 2 times, most recently from d93c0c6 to d61737d Compare October 18, 2026 19:19

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/State/RuntimeContextManager.php Resolved
@Litarnus
Litarnus force-pushed the continuous-profiling-15-deferred-chunks branch from d61737d to 5f614bd Compare October 18, 2026 19:39

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 3 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5f614bd. Configure here.

Comment thread src/Profiling/ContinuousProfiler.php Resolved
Comment thread src/State/RuntimeContextManager.php Resolved
@Litarnus
Litarnus force-pushed the continuous-profiling-15-deferred-chunks branch from c39db90 to 8a17378 Compare October 27, 2026 12:17
@Litarnus
Litarnus merged commit 43e7e37 into continuous-profiling-baseline-00 Oct 29, 2026
48 checks passed
@Litarnus
Litarnus deleted the continuous-profiling-15-deferred-chunks branch October 29, 2026 13:29
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.

2 participants