Commit Graph

29 Commits

Author SHA1 Message Date
edb8f19a0c Merge branch 'stable' into next-minor 2023-01-16 19:56:38 +00:00
ab21fcdd67 Server: fixed load statistics not including Snooze processing time
this has been a bug ever since Snooze was first introduced. The load statistic, similarly to timings, did not account for time spent processing notifications between ticks. The problem is that this is often where a significant amoutn of the load actually comes from, because Snooze is most often activated due to incoming packets.

This change fixes the problem by including the time spent processing notifications since the previous tick in the current tick's usage metric.
2023-01-16 19:26:32 +00:00
ad6a423d12 Merge branch 'stable' into next-minor 2023-01-16 18:30:13 +00:00
768650cee0 CS 2023-01-16 17:46:50 +00:00
c2c529e2da Include Snooze interrupts in timings results
fixes #5511

This requires any Timings instances to be updated to
pmmp/timings@5410f62436, otherwise the TPS
reported will be incorrect.
2023-01-16 17:40:39 +00:00
dff3f45d22 Constify more tick-related things 2023-01-13 16:29:09 +00:00
42f9336f7a Split packet receive timings into decode and handle subcomponents 2022-07-24 21:16:52 +01:00
38d6284671 Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
1d5430937f Modernize private property declarations in src/timings 2022-05-17 21:54:45 +01:00
bcc3e87730 Timings: rename core timers to remove 'timer' from the names
this makes them shorter and more consistent.
2020-12-23 17:52:25 +00:00
5282ae3298 TimingsHandler::printTimings() now returns a list of strings instead of requiring a resource 2020-12-09 22:32:32 +00:00
58db3531c7 Use hrtime() for collecting timings
this allows nanosecond resolution and generally better accuracy than microtime(), which is subject to floating-point errors.
2020-12-09 22:24:31 +00:00
5197707d32 Separated TimingsRecord from TimingsHandler (different lifetimes)
this fixes #3906.
TimingsHandler will now be automatically destroyed when there are no TimingsRecord referencing it and its owner has no references left to it.
TimingsRecord will be automatically destroyed at the end of the timings session (if active).

This fixes records from temporary timers being lost after the timings handlers are removed, while also fixing TimingsHandlers piling up regardless of whether timings are running or not.
This opens the doors to have more volatile timers, such as per-player/per-session timers, which are destroyed on player quit, but which won't result in the timings disappearing from the final timings result.
2020-12-03 15:45:49 +00:00
0634426c26 PermissibleBase: compute permission diff, do not fire callbacks when diff is empty
this fixes AvailableCommandsPacket getting sent twice when adding a PermissionAttachment.
2020-12-02 01:09:29 +00:00
87033592b1 Timings: remove obsolete timings handler 2020-12-01 17:40:09 +00:00
4d42f0c3db Timings: added timers for player data I/O 2020-11-27 00:02:34 +00:00
31089ce3b2 Timings: added broadcastPackets timer
the body of this function is potentially very expensive and isn't currently recorded by any timer.
2020-11-12 17:53:07 +00:00
3bf87378ef Merge branch 'stable'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/VersionInfo.php
#	src/pocketmine/level/LevelTimings.php
2020-11-08 19:44:30 +00:00
98db4c5200 Merge branch 'stable' into master
# Conflicts:
#	.gitmodules
#	composer.lock
#	resources/vanilla
#	src/network/mcpe/protocol/PlayerAuthInputPacket.php
#	src/pocketmine/Player.php
#	src/pocketmine/network/mcpe/protocol/LoginPacket.php
2020-08-10 17:55:49 +01:00
3473254d01 added Timings::INCLUDED_BY_OTHER_TIMINGS constant 2020-05-24 16:09:45 +01:00
fb1126797a Merge branch 'stable' 2020-02-07 18:13:55 +00:00
5c4487c980 added some callable prototypes for phpstan 2020-01-29 19:56:16 +00:00
1b33143f4f pass 2, manual removal of incorrect non-nullable phpdoc types 2020-01-22 12:06:47 +00:00
67bcc1c0fb phpdoc armageddon for master, pass 1 2020-01-22 11:55:03 +00:00
0050e12515 Merge commit '9232f4509c4b74718bce2d8f33ba71ca74b38d97'
# Conflicts:
#	resources/vanilla
2020-01-04 16:21:31 +00:00
d25e0c3d98 Merge commit 'cef77907c6b21e1fb167bc3085d00a5b1e740813'
# Conflicts:
#	resources/vanilla
#	src/timings/TimingsHandler.php
2020-01-04 16:21:05 +00:00
6968a4232e Merge commit 'd83820477fe905a85a4d1fd11bad1dba211f0f4f' 2019-12-25 14:20:38 +00:00
a9c09e4517 Merge branch 'next-minor' 2019-12-12 13:52:14 +00:00
5499ac620c Removed pocketmine subdirectory, map PSR-4 style 2019-07-30 19:14:57 +01:00