Dylan K. Taylor
e7771d76f2
Cover buffered inventory sync in timings
2023-03-20 23:29:02 +00:00
Dylan K. Taylor
419962d3a2
Added timer for player-specific movement code
...
players use an entirely different pathway for movement processing, which could be costly.
2023-03-19 16:12:47 +00:00
Dylan K. Taylor
054c06fab9
Add specialized entityBaseTick timer for item entities
...
since item merging is a potential hotspot, we want to know if this code section is a performance problem.
Current timers only tell us whether overall ticking of a particular entity is slow, but that includes movement and therefore isn't particularly helpful.
2023-03-19 15:59:06 +00:00
Dylan K. Taylor
7bc5d8c824
Rename more timers
2023-03-19 15:57:36 +00:00
Dylan K. Taylor
607bdfa42f
Timings: added new timers for entity move collision checks and projectile move ray tracing
...
projectiles get their own distinct sub-timer, since the logic is completely different from regular entities.
2023-03-19 15:49:35 +00:00
Dylan K. Taylor
eec53f9ae0
Timings: clean up timer names
2023-03-19 15:39:44 +00:00
Dylan K. Taylor
3d56bd267c
Timings: fixup network timer inheritance
2023-03-18 23:13:25 +00:00
Dylan K. Taylor
a523189149
Added separate timings for broadcast and session buffer compression
2023-03-04 16:41:41 +00:00
Dylan K. Taylor
871bd169a8
Timings: remove unnecessary code
2023-02-19 17:58:12 +00:00
Dylan K. Taylor
9cdb641936
Added encode packet timings
...
these changes required some new APIs in BedrockProtocol.
2023-02-19 16:47:20 +00:00
Dylan K. Taylor
edb8f19a0c
Merge branch 'stable' into next-minor
2023-01-16 19:56:38 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
ad6a423d12
Merge branch 'stable' into next-minor
2023-01-16 18:30:13 +00:00
Dylan K. Taylor
768650cee0
CS
2023-01-16 17:46:50 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
dff3f45d22
Constify more tick-related things
2023-01-13 16:29:09 +00:00
Dylan K. Taylor
42f9336f7a
Split packet receive timings into decode and handle subcomponents
2022-07-24 21:16:52 +01:00
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01:00
Dylan K. Taylor
1d5430937f
Modernize private property declarations in src/timings
2022-05-17 21:54:45 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
5282ae3298
TimingsHandler::printTimings() now returns a list of strings instead of requiring a resource
2020-12-09 22:32:32 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
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
Dylan K. Taylor
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
Dylan K. Taylor
87033592b1
Timings: remove obsolete timings handler
2020-12-01 17:40:09 +00:00
Dylan K. Taylor
4d42f0c3db
Timings: added timers for player data I/O
2020-11-27 00:02:34 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
3bf87378ef
Merge branch 'stable'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/VersionInfo.php
# src/pocketmine/level/LevelTimings.php
2020-11-08 19:44:30 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
3473254d01
added Timings::INCLUDED_BY_OTHER_TIMINGS constant
2020-05-24 16:09:45 +01:00
Dylan K. Taylor
fb1126797a
Merge branch 'stable'
2020-02-07 18:13:55 +00:00
Dylan K. Taylor
5c4487c980
added some callable prototypes for phpstan
2020-01-29 19:56:16 +00:00
Dylan K. Taylor
1b33143f4f
pass 2, manual removal of incorrect non-nullable phpdoc types
2020-01-22 12:06:47 +00:00
Dylan K. Taylor
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
Dylan K. Taylor
0050e12515
Merge commit '9232f4509c4b74718bce2d8f33ba71ca74b38d97'
...
# Conflicts:
# resources/vanilla
2020-01-04 16:21:31 +00:00
Dylan K. Taylor
d25e0c3d98
Merge commit 'cef77907c6b21e1fb167bc3085d00a5b1e740813'
...
# Conflicts:
# resources/vanilla
# src/timings/TimingsHandler.php
2020-01-04 16:21:05 +00:00
Dylan K. Taylor
6968a4232e
Merge commit 'd83820477fe905a85a4d1fd11bad1dba211f0f4f'
2019-12-25 14:20:38 +00:00
Dylan K. Taylor
a9c09e4517
Merge branch 'next-minor'
2019-12-12 13:52:14 +00:00
Dylan K. Taylor
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00