Page 1 of 1

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

Posted: Wed Jan 24, 2018 3:21 am
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.

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

Posted: Wed Jan 24, 2018 7:27 am
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

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

Posted: Thu Jan 25, 2018 1:13 am
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.