Skip to content

perf: fetch only container miner counts in inventory distribution - #207

Merged
tekwani merged 1 commit into
tetherto:developfrom
paragmore:refactor/inventory-distribution-projections
Aug 28, 2026
Merged

perf: fetch only container miner counts in inventory distribution#207
tekwani merged 1 commit into
tetherto:developfrom
paragmore:refactor/inventory-distribution-projections

Conversation

@paragmore

Copy link
Copy Markdown
Contributor

getInventoryMinerDistribution was reusing getMinersByContainer, so every request pulled all 13 per-container aggr fields (hashrate, power, efficiency, temps, counts) from the rtd log while only using minerCount.

Added getMinerCountsByContainer that requests just the 7 status-count fields and sums them per container. Since the ork derives the rack-side projection from aggrFields, this trims the rack->ork hop too. Also dropped the unused status flag from the endpoint's two list-things calls - it only needs id/type and container info fields.

No response shape changes. Extended the unit tests to pin the projection and cover the count summation.

@tekwani
tekwani merged commit 366851b into tetherto:develop Aug 28, 2026
6 checks passed
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.

3 participants