Repository navigation
Add the FinOps Database Resources tab to the web viewer (#4843) - #5041
Merged
Merged
Conversation
…ge (#4843) FinOpsHealthCalculator moves to PerformanceMonitor.Darling.Storage.FinOps and a new FinOpsCost helper carries the window budget, share, storage share and annual cost expressions the viewer computed inline, with identical decimal results. Also corrects the FinOps row-model header.
…4843) The SQL, a plain HighImpactQuery result and ReadAsync now live in Storage/FinOps, and HighImpactScorer works on that result. The viewer keeps its HighImpactQueriesSql alias, delegates to the reader and maps rows with HighImpactQueryRow.From. No figure changes: a live test pins the pre-move values on a seeded store.
A grouped per-server FinOps tool with a closed view set. Its first view, high_impact, serves the high-impact query_hash aggregates with their shares, impact score and a service-decided impact band.
The read route and the tool catalog now carry get_finops, so the high_impact view answers over HTTP with the same body the MCP tool returns, and an unknown view is refused with the tool's own 400 refusal. A live test compares the two bodies on a seeded store; the dispatch row was checked by temporarily dropping hours_back from it, which turned the parity fact red.
…ygiene scan sees (#4843)
…store live classes; sweep Storage subfolders for command deadlines (#4843)
…ew lines with detail in the guide, a relative-path sweep check; count get_finops in the tool census and scan partial MCP classes as one source (#4843)
…n as a call to it (#4843)
…ase-resources-reader
The viewer's copy had no callers left, and the two Storage copies were byte-identical. Both readers now call one internal helper.
…ase-resources-view
… lists, both collectors for not_collected, a fuller guide, I/O-only and PostgreSQL seeds (#4843) rows sorts by CPU, then I/O, then name, so ties never depend on SQL order. limit caps only the two top lists; rows has a fixed ceiling of 500. not_collected needs both query_stats and file_io_stats gated. The guide gains the empty-list, rollup, rounding and 24-hour notes, each pinned. Tests seed two I/O-only databases, a PostgreSQL-engine server, and neutral names.
…3-finops-database-resources-tab
…ase-resources-tab # Conflicts: # Darling/Darling.Tests/EngineCapabilityMissTests.cs # Darling/Darling.Tests/McpToolsListBudget/DarlingMcpFinOpsTools.txt
… column order, I/O stall in ms, an exact notice pin (#4843)
erikdarlingdata
marked this pull request as ready for review
October 3, 2026 20:15
This was referenced Oct 3, 2026
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.
The web viewer's FinOps Database Resources tab now shows a table over
get_finopsview=database_resources(hours24).FinOpsTab.xaml): database, CPU, CPU %, logical reads, physical reads, logical writes, executions, I/O read MB, I/O write MB, I/O %, I/O stall. CPU and I/O stall use themsformat. Every key is one the view'srowsentries emit.The notice is built from the answer:
N databases, last H hours., or "1 database" for one;truncatedis true,…; the top N of {database_count} databases by CPU, then I/O.Empty, not-collected, error and aborted/auth states match the High Impact tab.
Remaining: the desktop's 1/4/12/24/168 h window picker. The web tab uses a fixed 24 h, and the notice states it.
Tests: a new class,
FinOpsTabDatabaseResourcesPageTests, with 10 facts:DatabaseResourcesRowobject only, and the count equals its 11 properties;limitwould cap only the top lists, which this tab doesn't show.Verified at the head:
avg_cpu_ms, a key only the top lists carry, fails the key pin and the order pin.Refs #4843
SECTION: Added
ENTRY: - The web viewer's FinOps page gains the Database Resources tab ([#5041]) - per-database CPU, reads, writes, executions and file I/O for the server over the last 24 hours, with each database's share of the server's CPU and I/O, read from get_finops
REF: [#5041]: #5041