Skip to content

fix: accept documented profiling options in toolbar config - #70

Merged
JacobCoffee merged 1 commit into
mainfrom
fix/profiler-config-options
Oct 11, 2026
Merged

JacobCoffee merged 1 commit into
mainfrom
fix/profiler-config-options

Conversation

@JacobCoffee

Copy link
Copy Markdown
Owner

The configuration guide lists profiler_backend, profiler_top_functions, profiler_sort_by, profiler_tachyon_interval_usec and enable_flamegraph, but the config classes didn't declare them. Passing any of them, e.g. LitestarDebugToolbarConfig(profiler_backend="tachyon"), raised TypeError: unexpected keyword argument, so the new Tachyon backend could not be turned on the documented way.

The five options are now config fields, with the same defaults the Profiling panel already used, so nothing changes unless you set them.

Verified: a new test builds each real config class (base, Litestar, Starlette, FastAPI) with these options and checks the panel uses them; it fails on main and passes here. Existing tests used a mock config that accepted any attribute, which is why this wasn't caught. On Python 3.15, LitestarDebugToolbarConfig(profiler_backend="tachyon") now selects Tachyon.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 02:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@JacobCoffee
JacobCoffee enabled auto-merge (squash) October 11, 2026 02:22
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://JacobCoffee.github.io/debug-toolbar/pr-preview/pr-70/

Built to branch gh-pages at 2026-10-11 02:23 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@JacobCoffee
JacobCoffee merged commit dbbeda2 into main Oct 11, 2026
26 checks passed
@JacobCoffee
JacobCoffee deleted the fix/profiler-config-options branch October 11, 2026 02:27
@JacobCoffee JacobCoffee mentioned this pull request Oct 11, 2026
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