on_benchmark_ended{ms=,avg_ms=,min_ms=,max_ms=}

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

on_benchmark_ended{ms=,avg_ms=,min_ms=,max_ms=}

Post by quyxkh »

When running benchmarks it'd be nice to for instance be able to dump all the flow statistics at the start and end, but discovering when that end tick is would take some chicanery, and getting an event on just that tick isn't doable at all. I currently use on_train_changed_state to write stats for the cargo every time a train leaves a station, and that's working well for me, the overhead is down near the noise, but there's plenty of things that a one-time report at the end would be useful for, and my awk for postprocessing the stats isn't exactly mod-installer friendly.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2918
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: on_benchmark_ended{ms=,avg_ms=,min_ms=,max_ms=}

Post by Optera »

If all you want is getting the console output into a file redirect stdout

Code: Select all

factorio.exe options >> logfile
> creates a new file, >> appends

quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: on_benchmark_ended{ms=,avg_ms=,min_ms=,max_ms=}

Post by quyxkh »

I already pipe the console through my postprocessor for my own use but that won't work too well out-of-the-box from the mod portal and doesn't (can't? seems to me per-save mod-settings means there's no outside way to get new settings into a map) allow last-benchmark-tick stats calcs based on info that isn't dumped regularly. I really don't want to dump the entire item, fluid and power flow tables regularly, and it'd be really nice to be able to have an analysis mod just print the summary lines itself.

Post Reply

Return to “Modding interface requests”