Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production/Consumption Data inverted - 1.2 - Default: Items - Factorio #28

Open
adrianvanderwal opened this issue Mar 19, 2023 · 7 comments

Comments

@adrianvanderwal
Copy link

adrianvanderwal commented Mar 19, 2023

While watching my stats for module production, I noticed that the graphs showed the opposite of what was happening in game.

image
image

The Production graph is pulling from:
image
rate(factorio_item_production_output{force=~"${Force}",name=~"${Item}"}[$__rate_interval]) * ${TimeScale}, however, it is clearly displaying the consumption statistic.

@adrianvanderwal adrianvanderwal changed the title 1.2 - Default: Items - Factorio Production/Consumption Data inverted - 1.2 - Default: Items - Factorio Mar 19, 2023
@adrianvanderwal
Copy link
Author

Factorio Version: 1.1.77
graftorio2 Version: 0.0.20

@remijouannet
Copy link
Owner

Hello, i don't fully understand, the issue is from the dashboard or from the metric itself ?

@adrianvanderwal
Copy link
Author

Both (Unless the metric names have a translation issue.)

factorio_item_production_output I would take to mean Production.
factorio_item_production_input I would take to mean Consumption.

The the default dashboard graphs show the data inverted.

I will try and form a more definitive response when I'm not on mobile.

@remijouannet
Copy link
Owner

well the issue can't be in both ways or you'll have the same issue if i invert the metric and the dashboard

@remijouannet
Copy link
Owner

looking at the code there is no naming error, but looking at the documentation https://lua-api.factorio.com/latest/LuaFlowStatistics.html

for item
consumption = output
Production = input

@adrianvanderwal
Copy link
Author

for item
consumption = output
Production = input

That would make more sense.
The issue is then simply on the default dashboard - 1.2 - Default Items.

The current production graph panel shows that the query is:
rate(factorio_item_production_output{force=~"${Force}",name=~"${Item}"}[$__rate_interval]) * ${TimeScale}

@Kariton
Copy link
Contributor

Kariton commented Apr 17, 2023

hey @adrianvanderwal,
im sorry for the inconvenience.

i will looke into that and fix my dashboards.
additionaly im currently working on more stats, metadata and other inprovements that can be made.

stay tuned! :)

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

No branches or pull requests

3 participants