9 Commits

Author SHA1 Message Date
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
Dylan K. Taylor
6846f1e78a
Replace disallowed operators in tests/ 2022-01-20 16:48:36 +00:00
Dylan K. Taylor
06f20234f7
Scrub unused imports 2021-03-26 22:56:09 +00:00
Dylan K. Taylor
169650dc5b
MainLogger: accept timezone as a constructor parameter
this makes it easier to unit-test, as well as making it independent of Timezone.
2021-02-04 21:50:06 +00:00
Dylan K. Taylor
27b1951df7
MainLogger: accept main thread name as a constructor parameter 2021-02-04 20:55:50 +00:00
Dylan K. Taylor
709b4154d7
MainLogger: Require useFormattingCodes as a constructor parameter
this avoids needing to call Terminal::init() before starting a MainLogger. Since it inits the formatting codes anyway when log messages are first recorded, it shouldn't be necessary to pre-initialize it.
2021-02-04 19:16:22 +00:00
Dylan K. Taylor
ae75d73f48
Extract MainLoggerThread unit from MainLogger
MainLogger is no longer a Thread, as per the recent changes to pocketmine/log-pthreads.
2021-02-04 16:28:49 +00:00
Dylan K. Taylor
29f6ed3f68 Use Snooze to improve AsyncTask collection times
regardless of how long an async task takes to run, it will take a multiple of 50ms to get the result processed. This delay causes issues in some cases for stuff like generation, which causes locking of adjacent chunks, and async packet compression, which experiences elevated latency because of this problem.
This is not an ideal solution for packet compression since it will cause the sleeper handler to get hammered, but since it's already getting hammered by every packet from RakLib, I don't think that's a big problem.
2020-12-02 19:34:34 +00:00
Dylan K. Taylor
e3dec95b75 Convert AsyncPool tests into PHPUnit tests 2020-05-11 11:34:50 +01:00