feat: Add per-machine consumption metrics and recipe label - #35
Merged
AP-Hunt merged 3 commits intoAug 18, 2026
Conversation
FRMC already parses each building's Recipe and Ingredients from getFactory, but never exposed consumption as a metric, only production. This adds machine_items_consumed_per_min, machine_items_consumed_max, and machine_items_consumed_pc, mirroring the existing produced-item metrics. Also adds a recipe label to both the produced and consumed machine metrics, sourced from the same already-parsed Recipe field. Without it, there's no way to tell which recipe variant a machine is running when multiple recipes share an output item.
Adds coverage for machine_items_consumed_per_min, _max, and _pc, including a multi-ingredient case. Updates existing assertions for the new recipe label on the produced-item metrics.
Adds the three new machine_items_consumed_* rows and the recipe label on the existing machine_items_produced_* rows.
Owner
|
Hi @jwalker343 Thanks for taking your time to add this, I appreciate it. I also appreciate the transparency on the LLM. I've reviewed it all and I'm happy with it. I'm going to merge it now, and cut a release this evening. |
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.
What is this?
This PR adds 3 per-machine consumption metrics:
machine_items_consumed_per_minmachine_items_consumed_pcmachine_items_consumed_maxwith a goal of answering this question: What machines/recipes are using all the rubber in my factory.
This PR also adds the
recipelabel to these existing metrics for both symmetry and clarity on the actual output recipes. (Alts vs base)machine_items_produced_per_minmachine_items_produced_pcmachine_items_produced_maxExample dashboard:
Notes
All of this data was already sourced from FRM, just not exported as metrics, so no additional calls are made back to FRM.
It is possible that adding the recipe label to existing metrics may be a breaking change for some dashboards, would appreciate testing and advice there.
Full Disclosure: Claude wrote the code changes and tests, I reviewed everything.