mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
* [Client] Detect main-thread event loop stalls LagMonitor ticks the GUI event loop every 500 ms and records gaps beyond 2 s as stalls, warning with their duration and keeping a bounded ring of recent records for diagnostics. Measurement uses a monotonic QElapsedTimer so wall-clock steps and suspend do not fabricate stalls. Recorded timestamps stay in wall time for correlating with user reports. Took 1 minute Took 13 minutes Took 2 minutes * [Client] Rename LagMonitor constants to SCREAMING_SNAKE_CASE Took 15 minutes * [Client] Discard suspend-spanning gaps in LagMonitor Windows counts sleep time in its monotonic clock, so a suspend would fabricate one bogus stall per resume. Reset the clock on application state changes and drop implausibly huge gaps; extract recordGap() for testability. Took 3 minutes * [Client] Unit test LagMonitor stall recording Drives recordGap() directly to cover the threshold, plausibility cap, trim, and clear behavior without timing-dependent waits. Took 36 seconds --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> |
||
|---|---|---|
| .. | ||
| card_zone_algorithms | ||
| carddatabase | ||
| loading_from_clipboard | ||
| movecard_tests | ||
| oracle | ||
| settings | ||
| clamped_arithmetic_test.cpp | ||
| CMakeLists.txt | ||
| deck_hash_performance_test.cpp | ||
| dummy_test.cpp | ||
| expression_test.cpp | ||
| lag_monitor_test.cpp | ||
| latency_tracker_test.cpp | ||
| password_hash_test.cpp | ||
| playmat_resolver_test.cpp | ||
| server_card_counter_test.cpp | ||
| server_counter_test.cpp | ||
| server_rate_limiter_test.cpp | ||
| test_age_formatting.cpp | ||
| warning_categories_test.cpp | ||