Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor 2023-01-18 15:30:42 +00:00
commit d37142af4b
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
5 changed files with 27 additions and 10 deletions

View File

@ -93,3 +93,14 @@ Released 16th January 2023.
## Other changes ## Other changes
- Increased packet batch budget for player sessions. - Increased packet batch budget for player sessions.
# 4.12.10
Released 18th January 2023.
## Fixes
- Fixed reported server load not including the time spent processing Snooze interrupts between ticks (e.g. incoming network packets).
- Fixed `Connection Handler` entry in timings report not including time spent receiving packets.
## Note about server load & performance
This version will report higher apparent server load than previous versions. The actual performance of the server is unchanged; the previous reported load was inaccurate.
These bugs have been present for nearly 5 years (ever since the first introduction of Snooze in 3.0.0).

View File

@ -54,7 +54,7 @@
"webmozart/path-util": "^2.3" "webmozart/path-util": "^2.3"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "1.9.11", "phpstan/phpstan": "1.9.12",
"phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-phpunit": "^1.1.0",
"phpstan/phpstan-strict-rules": "^1.2.0", "phpstan/phpstan-strict-rules": "^1.2.0",
"phpunit/phpunit": "^9.2" "phpunit/phpunit": "^9.2"

14
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "b96f3344335da3824bd4640210c9499e", "content-hash": "480dceecbc8a6fac8c498dfcc0938a73",
"packages": [ "packages": [
{ {
"name": "adhocore/json-comment", "name": "adhocore/json-comment",
@ -1832,16 +1832,16 @@
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.9.11", "version": "1.9.12",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "60f3d68481eef216199eae7a2603cd5fe124d464" "reference": "44a338ff0d5572c13fd77dfd91addb96e48c29f8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/60f3d68481eef216199eae7a2603cd5fe124d464", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/44a338ff0d5572c13fd77dfd91addb96e48c29f8",
"reference": "60f3d68481eef216199eae7a2603cd5fe124d464", "reference": "44a338ff0d5572c13fd77dfd91addb96e48c29f8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1871,7 +1871,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/phpstan/phpstan/issues", "issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/1.9.11" "source": "https://github.com/phpstan/phpstan/tree/1.9.12"
}, },
"funding": [ "funding": [
{ {
@ -1887,7 +1887,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-01-12T14:04:13+00:00" "time": "2023-01-17T10:44:04+00:00"
}, },
{ {
"name": "phpstan/phpstan-phpunit", "name": "phpstan/phpstan-phpunit",

View File

@ -31,7 +31,7 @@ use function str_repeat;
final class VersionInfo{ final class VersionInfo{
public const NAME = "PocketMine-MP"; public const NAME = "PocketMine-MP";
public const BASE_VERSION = "4.12.10"; public const BASE_VERSION = "4.12.11";
public const IS_DEVELOPMENT_BUILD = true; public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_CHANNEL = "stable"; public const BUILD_CHANNEL = "stable";

View File

@ -36,6 +36,7 @@ use pocketmine\network\NetworkInterfaceStartException;
use pocketmine\network\PacketHandlingException; use pocketmine\network\PacketHandlingException;
use pocketmine\Server; use pocketmine\Server;
use pocketmine\snooze\SleeperNotifier; use pocketmine\snooze\SleeperNotifier;
use pocketmine\timings\Timings;
use pocketmine\utils\Utils; use pocketmine\utils\Utils;
use raklib\generic\SocketException; use raklib\generic\SocketException;
use raklib\protocol\EncapsulatedPacket; use raklib\protocol\EncapsulatedPacket;
@ -110,7 +111,12 @@ class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
public function start() : void{ public function start() : void{
$this->server->getTickSleeper()->addNotifier($this->sleeper, function() : void{ $this->server->getTickSleeper()->addNotifier($this->sleeper, function() : void{
Timings::$connection->startTiming();
try{
while($this->eventReceiver->handle($this)); while($this->eventReceiver->handle($this));
}finally{
Timings::$connection->stopTiming();
}
}); });
$this->server->getLogger()->debug("Waiting for RakLib to start..."); $this->server->getLogger()->debug("Waiting for RakLib to start...");
try{ try{