Repository navigation
perf(dashboard): scan capacity metrics once and extract versions per resource - #322
Merged
Merged
Conversation
…resource The hosts and containers panels expanded their shared raw CTE into four Parquet scans each, decoding resource identity for every matching metric row four times. Materialize the CTE once and project only the columns its consumers read. On a one-hour OpenTelemetry Demo snapshot the warm panel time fell from 1,062 to 243 ms (hosts) and from 1,003 to 240 ms (containers). The versions panel extracted five resource fields from every span, log record and metric point in the window. Group each signal by namespace, service and resource with its earliest event first, then extract the fields once per distinct resource. First-seen times and runtime/SDK distinctions are unchanged; warm time fell from 4,164 to 2,277 ms. Frames match the previous SQL on the snapshot within 1e-12. New tests cover first-seen and runtime/SDK tuples, capacity retries, cumulative resets, deltas, namespaces, missing identities and freshness boundaries. Claude-Session: https://claude.ai/code/session_01XA52nWyQ3R5f5kK8kjpAQW
vishr
force-pushed
the
perf/dashboard-panels
branch
from
October 16, 2026 18:05
2bb2945 to
ec725eb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On OpenTelemetry Demo data, the default System overview dashboard's hosts, containers and versions panels were close to, or over, the 10-second panel deadline when ingest was also running.
MATERIALIZEDand projects only the columns its consumers read. The plan has one metric scan.No other panel, storage format, cache, deadline or engine setting changes.
Evidence
One-hour frozen window from a 2.2M-span OpenTelemetry Demo snapshot. Each panel ran in a fresh process: one cold run, then three warm runs.
All frames match the previous SQL within 1e-12, which allows for floating-point aggregation order.
New tests cover:
Verification
go test ./internal/dashboard/... ./internal/panel/...: passed.just check(pre-push): passed.