mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 22:25:23 +01:00
c529f9510f
LogService() flushed log.txt after every line it wrote, a WriteFile for each "EVENT LAUNCHED". It now writes the lines a pass of the service takes off the queue (every 50 ms) and flushes them once at the end of the pass, so a line is in the file at most a pass after it was logged; the last pass after the stop flushes too. A crash report takes the last lines from crashdump_note_log() as before, and errors.txt is still flushed after every line. The content of log.txt is the same. The service runs in a thread of its own, so the flushes never cost the simulation's thread: the flush/NtWriteFile on the main thread in the profile is the black box's (blackbox_recorder::update() flushing its file after every look around), which this doesn't change. 600 s in --test, seed 12345, one run each: Tomaszewo sim 133.0 s against 131.1 s the step before, L107 18.9 s against 18.5 s: within the run-to-run spread. The physics logs (14 and 9) and the event logs are byte-identical to staging's, log.txt has the same lines (only times, versions and memory figures differ), unit tests 1207/1207 with exact golden traces.