Garry's Mod

Garry's Mod

373 vurderinger
Addon hooks Lag Finder
2
3
2
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Content Type: Addon
Addon Type: Tool
Filstørrelse:
Offentliggjort:
Opdateret:
5.839 KB
11. maj 2016 kl. 22:48
28. juli 2017 kl. 14:49
10 ændringsbemærkninger ( vis )

Abonner for at downloade
Addon hooks Lag Finder

I 9 samlinger af Cédric GÉRILLE [GiletJaune]
Board Games by Mohamed Rachid
16 genstande
The TTT by Mohamed Rachid
39 genstande
The DarkRP by Mohamed Rachid
44 genstande
Soccer by Mohamed RACHID
37 genstande
Université Joseph Poireau (serveur)
70 genstande
MR: Serveur Garry's Mod Jeu en 2D
11 genstande
Dev Tests Mohamed
50 genstande
G-1:788429
50 genstande
Optimization addons
7 genstande
Beskrivelse
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 kommentarer
4thsword 19. aug. kl. 20:23 
thank you man this addon is extremely helpful:steamthumbsup::steamhappy:
>KB> >KEKSQUAD 14. aug. kl. 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]  [ophavsmand] 6. juni kl. 10:17 
Hey! Thanks for the love! :extralife:
Shimyo 3. juni kl. 17:50 
hey so i love u for this
Cédric GÉRILLE [GiletJaune]  [ophavsmand] 3. juni kl. 11:10 
I made it specially for you in the first place! 😉
Boing 14. maj kl. 22:56 
this has been very handy, thank you.
Cédric GÉRILLE [GiletJaune]  [ophavsmand] 2. jan. kl. 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. dec. 2024 kl. 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]  [ophavsmand] 21. apr. 2024 kl. 1:39 
"lua/entities/ent_proxsensor/cl_init.lua" is missing. That's all I can tell.
Market Pluh 20. apr. 2024 kl. 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?