Skip to content

Replace VarDumper TCP and Profiler HTTP with RoadRunner plugins#314

Merged
butschster merged 2 commits intomasterfrom
feature/profiler-rr-plugin
Mar 26, 2026
Merged

Replace VarDumper TCP and Profiler HTTP with RoadRunner plugins#314
butschster merged 2 commits intomasterfrom
feature/profiler-rr-plugin

Conversation

@butschster
Copy link
Copy Markdown
Member

Summary

  • VarDumper: replace PHP TCP handler with Go-based RR var-dumper-server plugin. Dumps are received via TCP in Go, forwarded through Jobs pipeline, consumed by DumpHandler.php
  • Profiler: add Go-based RR profiler-server plugin that receives XHProf data via HTTP, processes it entirely in Go (peaks, diffs, edges tree, percentages), and forwards pre-computed results through Jobs pipeline to ProfileHandler.php which only persists to DB
  • Docker build: fix BuildKit secret mounting for GH_TOKEN — add syntax directive, correct env var name, handle missing secret gracefully
  • velox.toml: register both var-dumper-server@1.0.1 and profiler-server@1.0.0 plugins

New Go plugin repos

Test plan

  • PHP tests pass (VarDumper: 12 tests, Profiler: 4 tests)
  • Go profiler plugin tests pass (21 tests)
  • Docker image builds successfully with all plugins
  • Verify VarDumper dumps received correctly via the new plugin
  • Verify XHProf profiles processed correctly via the new plugin

🤖 Generated with Claude Code

butschster and others added 2 commits March 27, 2026 01:40
Wire up the Go-based profiler-server RoadRunner plugin that receives
XHProf data via HTTP, processes it in Go (peaks, diffs, edges,
percentages), and forwards the result as a profiler.profile job.

- Add ProfileHandler.php: receives pre-processed profile from Go plugin
  and persists Profile + Edges to DB, then dispatches event for
  broadcasting (no computation needed on PHP side)
- Register profiler.profile job handler in queue.php
- Add profiler plugin config + jobs pipeline to .rr.yaml and .rr-prod.yaml
- Register profiler-server in velox.toml for RR binary builds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VarDumper migration to RR plugin:
- Add DumpHandler consuming vardumper.dump jobs from RR plugin
- Remove TCP Service (replaced by Go plugin)
- Remove var-dumper from tcp.php and TCP servers in .rr configs
- Register vardumper.dump handler in queue.php
- Configure var-dumper plugin + jobs pipeline in .rr.yaml/.rr-prod.yaml
- Register var-dumper-server 1.0.1 in velox.toml
- Update tests to invoke DumpHandler directly

Profiler RR plugin integration:
- Add ProfileHandler receiving pre-processed profiles from Go plugin
- Register profiler.profile handler in queue.php
- Configure profiler plugin + jobs pipeline in .rr configs
- Register profiler-server 1.0.0 in velox.toml

Docker build fixes:
- Add # syntax=docker/dockerfile:1 for BuildKit --mount support
- Export GH_TOKEN (not RT_TOKEN) to match velox.toml reference
- Handle missing secret gracefully for local builds
- Add DOCKER_BUILDKIT=1 to Makefile build target

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@butschster butschster merged commit 59f2846 into master Mar 26, 2026
6 of 7 checks passed
@butschster butschster deleted the feature/profiler-rr-plugin branch March 26, 2026 22:16
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