Skip to content

fix(zmi): show configured slow-query threshold in empty state#196

Merged
jensens merged 1 commit into
mainfrom
fix/slow-queries-empty-state-threshold
Jul 3, 2026
Merged

fix(zmi): show configured slow-query threshold in empty state#196
jensens merged 1 commit into
mainfrom
fix/slow-queries-empty-state-threshold

Conversation

@jensens

@jensens jensens commented Jul 1, 2026

Copy link
Copy Markdown
Member

The Slow Queries tab's empty-state message hard-coded the env var name and its default:

Queries exceeding the threshold (PGCATALOG_SLOW_QUERY_MS, default 10ms) are logged here automatically.

The actually-configured threshold is more useful than the default. manage_get_slow_query_threshold() (already used for the tab header) returns it, so the message now reads e.g. "Queries exceeding the configured threshold (25ms, set via PGCATALOG_SLOW_QUERY_MS) …".

tests/test_slow_queries_view.py: asserts the empty state uses the dynamic threshold and no longer hard-codes default 10ms.

🤖 Generated with Claude Code

The Slow Queries tab's 'no slow queries yet' message hard-coded the
PGCATALOG_SLOW_QUERY_MS env var name and its default of 10ms. The actual
configured value is more useful, and manage_get_slow_query_threshold()
(already used for the header) exposes it. Show that instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jensens
jensens merged commit b806305 into main Jul 3, 2026
5 checks passed
@jensens
jensens deleted the fix/slow-queries-empty-state-threshold branch July 3, 2026 06:59
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