Skip to content

Profiling - #81

Merged
Sachinxmpl merged 4 commits into
mainfrom
profiling
Aug 24, 2026
Merged

Sachinxmpl merged 4 commits into
mainfrom
profiling

Conversation

@Sachinxmpl

@Sachinxmpl Sachinxmpl commented Aug 24, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added an optional debug server for runtime profiling and diagnostics.
    • Added configurable profiling support for CPU, memory, and goroutine activity.
  • Documentation

    • Added profiling instructions, benchmark findings, and sample profiling reports.
    • Updated the example configuration with health checks, rate limits, timeouts, routing, and weighted backends.
  • Chores

    • Added profiling files to version control and included a script for generating profiling data.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 260e37c3-5366-46d6-95aa-bc43859fbf2f

📥 Commits

Reviewing files that changed from the base of the PR and between 8de9cae and ba2284d.

📒 Files selected for processing (13)
  • .gitignore
  • cmd/gobalancer/serve.go
  • configl7.example.yaml
  • docs/benchmark.md
  • docs/profiles/cpu-top.txt
  • docs/profiles/cpu.prof
  • docs/profiles/goroutine-top.txt
  • docs/profiles/goroutine.prof
  • docs/profiles/heap-top.txt
  • docs/profiles/heap.prof
  • docs/profiling.md
  • internal/debug/server.go
  • test/bench/profile.sh

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds an optional pprof debug server, a profiling script, profiling reports, profiling documentation, and an expanded example L7 configuration.

Changes

Profiling support

Layer / File(s) Summary
Debug server lifecycle
cmd/gobalancer/serve.go, internal/debug/server.go
GoBalancer accepts --debug-addr, starts the pprof server when configured, reports startup errors, and shuts it down with the shared context.
Profiling workload and capture harness
test/bench/profile.sh, configl7.example.yaml, .gitignore
The script builds and starts the profiling workload, generates sustained traffic, captures CPU, heap, and goroutine profiles, and writes summaries under docs/profiles/. The example configuration defines the listener, balancing, health checks, rate limits, timeouts, and two weighted backends.
Profiling results and documentation
docs/profiling.md, docs/benchmark.md, docs/profiles/*
Documentation describes the profiling procedure, workload, results, and limitations. CPU, heap, and goroutine profile reports are included.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to ba228

This profiling-focused change has no actionable merge-blocking risk identified at the current head; it is merge-ready after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant ProfileScript
  participant FastBackends
  participant GoBalancer
  participant LoadGenerator
  participant Pprof
  ProfileScript->>FastBackends: Start two test backends
  ProfileScript->>GoBalancer: Start with pprof enabled
  LoadGenerator->>GoBalancer: Generate sustained HTTP load
  ProfileScript->>Pprof: Request CPU, heap, and goroutine profiles
  Pprof-->>ProfileScript: Return profile data
  ProfileScript->>ProfileScript: Write pprof summaries
Loading

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@Sachinxmpl
Sachinxmpl merged commit 3beb431 into main Aug 24, 2026
4 checks passed
@Sachinxmpl
Sachinxmpl deleted the profiling branch August 25, 2026 02:58
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