Garry's Mod
367 คะแนน
Addon hooks Lag Finder
2
3
2
   
รางวัล
ชื่นชอบ
ชื่นชอบแล้ว
เลิกชื่นชอบ
Content Type: Addon
Addon Type: Tool
ขนาดไฟล์
โพสต์
อัปเดต
5.839 KB
11 พ.ค. 2016 @ 10: 48pm
28 ก.ค. 2017 @ 2: 49pm
10 หมายเหตุการเปลี่ยนแปลง ( ดู )
อยู่ใน 9 ชุดสะสม โดย Cédric GÉRILLE [GiletJaune]
Board Games by Mohamed Rachid
16 รายการ
The TTT by Mohamed Rachid
39 รายการ
The DarkRP by Mohamed Rachid
44 รายการ
Soccer by Mohamed RACHID
37 รายการ
Université Joseph Poireau (serveur)
70 รายการ
MR: Serveur Garry's Mod Jeu en 2D
11 รายการ
Dev Tests Mohamed
50 รายการ
G-1:788429
50 รายการ
Optimization addons
7 รายการ
คำอธิบาย
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!
93 ความเห็น
Cédric GÉRILLE [GiletJaune]  [ผู้สร้าง] 6 มิ.ย. @ 10: 17am 
Hey! Thanks for the love! :extralife:
Shimyo 3 มิ.ย. @ 5: 50pm 
hey so i love u for this
Cédric GÉRILLE [GiletJaune]  [ผู้สร้าง] 3 มิ.ย. @ 11: 10am 
I made it specially for you in the first place! 😉
Boing 14 พ.ค. @ 10: 56pm 
this has been very handy, thank you.
Cédric GÉRILLE [GiletJaune]  [ผู้สร้าง] 2 ม.ค. @ 11: 52am 
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 ธ.ค. 2024 @ 9: 26am 
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]  [ผู้สร้าง] 21 เม.ย. 2024 @ 1: 39am 
"lua/entities/ent_proxsensor/cl_init.lua" is missing. That's all I can tell.
Market Pluh 20 เม.ย. 2024 @ 2: 14am 
[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?
Cédric GÉRILLE [GiletJaune]  [ผู้สร้าง] 30 มี.ค. 2024 @ 1: 34am 
Yes! :missing: Thank you!
Lexeychik 29 มี.ค. 2024 @ 11: 38am 
most usefull addon EVER:steamthumbsup::missing::steamthumbsup: