Garry's Mod
379 valoraciones
Addon hooks Lag Finder
2
3
2
   
Premiar
Favoritos
Favorito
Quitar
Tipo de contenido: Extensión
Tipo de extensión: Herramienta
Tamaño
Publicado el
Actualizado el
5.839 KB
11 MAY 2016 a las 22:48
28 JUL 2017 a las 14:49
10 notas sobre cambios ( ver )

Suscríbete para descargar
Addon hooks Lag Finder

En 9 colecciones creadas por Cédric GÉRILLE [GiletJaune]
Board Games by Mohamed Rachid
16 artículos
The TTT by Mohamed Rachid
39 artículos
The DarkRP by Mohamed Rachid
44 artículos
Soccer by Mohamed RACHID
37 artículos
Université Joseph Poireau (serveur)
70 artículos
MR: Serveur Garry's Mod Jeu en 2D
11 artículos
Dev Tests Mohamed
50 artículos
G-1:788429
50 artículos
Optimization addons
7 artículos
Descripción
This addon finds the laggiest hooks and displays them in console.
It is not magic, read description to learn how to use it!

[curse.com]

Available on GitHub: Addon hooks Lag Finder[github.com]

The reports display laggy hook names, performance impact, file location and matching Workshop addon.
Proceeding with the test to identify a lag that is not observable will not help. Locating a lag implies that a lag is occurring.
Currently, inspected hooks are from: GM, hook, net, usermessage, timer, ENT, SWEP and the main scene rendering.
This addon ignores lags from VGUI and lags that do not involve Lua.
As a golden rule, avoid modifying Lua files during the test, in order to prevent restoring old functions and to prevent ignoring added / reloaded functions.
GM, ENT and SWEP functions added / modified / reloaded during the test are ignored and an old version will be restored at the end of the test.
Hooks / callbacks added / modified / reloaded without the provided function during the test will be ignored.

The Addon hooks Conflict Finder is required in order to identify Workshop addons.
The Addon hooks Conflict Finder is the base of this addon. See its description.

Usage
These commands must be entered in console.
The command finishing with "sv" is for a serverside test, only for superadmins.
The command finishing with "cl" is for a clientside test.

- To start a simple test:
find_laggy_hooks_sv find_laggy_hooks_cl
- To stop a simple test:
find_laggy_hooks_sv 0 find_laggy_hooks_cl 0
- Full syntax:
find_laggy_hooks_sv [ReportInterval=30 or 0] [TopCount=16 or RatioThreshold] find_laggy_hooks_cl [ReportInterval=30 or 0] [TopCount=16 or RatioThreshold]
ReportInterval - How many seconds between reports, small values recommended
TopCount - How many hooks to display on each report
RatioThreshold - Display all hooks above the given impact threshold, example: 0.1 means 10%

The more ReportInterval is high, the less you will see one-time lags on top of the list. This is due to the Impact which is not affected by the unreliable Max time.

Columns
Identifier: The type and the name of the hook
Impact: Calculated impact on framerate
Executions: Number of executions of the hook during last capture period
Mean time per frame: Mean execution time per frame over last capture period
Max time: Maximum execution time of the hook

Known bugs
- The time measurement often goes wrong, causing Max time to have a crazy high value.

See also
DBugR[github.com], by oubliette32
LagDetector, by Buzzkill
FProfiler[github.com], by FPtje

Good luck!
95 comentarios
4thsword 19 AGO a las 20:23 
thank you man this addon is extremely helpful:steamthumbsup::steamhappy:
>KB> >KEKSQUAD 14 AGO a las 15:23 
There should be a way to target specific hooks with this addon, preferably in the form of another argument
Cédric GÉRILLE [GiletJaune]  [autor] 6 JUN a las 10:17 
Hey! Thanks for the love! :extralife:
Shimyo 3 JUN a las 17:50 
hey so i love u for this
Cédric GÉRILLE [GiletJaune]  [autor] 3 JUN a las 11:10 
I made it specially for you in the first place! 😉
Boing 14 MAY a las 22:56 
this has been very handy, thank you.
Cédric GÉRILLE [GiletJaune]  [autor] 2 ENE a las 11:52 
Greetings!
Your case is a little special. As mentioned in the messages, the errors come from the conflict finder, not the lag finder. Please retry the lag finder after uninstalling the conflict finder. I'm sorry for the inconvenience.
It seems that there is a special case where the conflict finder tries to send information, but for an odd reason, it seems that the information is too large, and that is surprising to me!
Well, good point here: the conflict finder needs to be fixed to handle this special case where there is too much information about the location of Lua files. I did not expect this!
The message about the not found hooks for event "1" does not give me any ideas BTW.
Mr.Toymaker 31 DIC 2024 a las 9:26 
It stopped working for me.. it pops me "Could find no hook with event name "1"!

[Addon hooks Conflict Finder] net.WriteData: Invalid length 67602!
1. unknown - lua/autorun/find_conflicts_hook.lua:72
2. pcall - [C]:-1
3. func - lua/autorun/find_laggy_hooks.lua:312
4. unknown - lua/includes/extensions/net.lua:37


[Addon hooks Conflict Finder] lua/autorun/find_conflicts_hook.lua:81: bad argument #1 to 'JSONToTable' (string expected, got no value)
1. JSONToTable - [C]:-1
2. net_ReceiveLuaFiles - lua/autorun/find_conflicts_hook.lua:81
3. func - lua/autorun/find_conflicts_hook.lua:147
4. unknown - lua/includes/extensions/net.lua:37" As i try to do a clientside test..
Cédric GÉRILLE [GiletJaune]  [autor] 21 ABR 2024 a las 1:39 
"lua/entities/ent_proxsensor/cl_init.lua" is missing. That's all I can tell.
Market Pluh 20 ABR 2024 a las 2:14 
[Stealth 2.1 (Improved Stealth Mod)] AddCSLuaFile: Couldn't find 'cl_init.lua'
1. unknown - lua/entities/ent_proxsensor/init.lua:1

where do I find the hook here?
and what do I type in the command?