Garry's Mod

Garry's Mod

85 oy
LagDetector
   
Ödül
Favorilere Ekle
Favorilere Eklendi
Favorilerden Çıkar
İçerik Türü: Eklenti
Eklenti Türü: Oyun Modu
Dosya Boyutu
Gönderilme
Güncellenme
3.061 KB
27 Mar 2016 @ 15:24
25 Haz 2017 @ 15:39
6 Değişiklik Notu ( görüntüle )

İndirmek için abone ol
LagDetector

Açıklama
GMod Server Lag Detection Routine
Written by Buzzkill -- thehundredacrebloodbath.com
https://github.com/100acrebb/thab_tools

LagDetector is a simple tool to help detect and manage server-side lag. It uses differences between SysTime() and CurTime() to detect unexpected server lag, and once these deltas have exceeded a certain threshold, action can be taken to help correct.

These thresholds and actions are configurable through cvars:

lagdet_range
if the difference between SysTime and CurTime exceeds this value in a frame, we have detected frame lag and the system increments the lag counter. Default is 0.07

lagdet_count
if the lag counter reaches this value, we have detected server lag and we execute lagdet_execute. Default is 5

lagdet_quiet
indicates how long we must go (in seconds) with no frame lag before our lag counter resets to 0.

lagdet_execute
the console command(s) to execute if we detect server lag. Default is a simple say

lagcount_meltdown
if we detect this many frame lags without a reset, we execute lagexecute_meltdown. Default is 100

lagexecute_meltdown
these console command(s) are executed in the event of massive lag. Server is probably in a collision loop or something. Good time to restart the map. Default is a simple say

So, using the defaults..
LagDetector will compare SysTime and CurTime every second. If the difference between the two >= 0.07, the lag counter increases.
If we go 15 seconds without detecting frame lag, the lag counter resets to 0.
If the lag counter hits 5, we execute the commands in lagdet_execute
If the lag counter hits 100, we execute the commands in lagexecute_meltdown
27 Yorum
demonicrobot50 8 Kas 2023 @ 6:44 
does this works on singleplayer?
Cats 22 Eki 2022 @ 14:01 
Not sure if this is still being maintained but it seems like this addon has trouble trying to detect this kind of server lag/crashing at least with the default values used (or maybe this would be considered beyond what the addon is capable of handling).

https://www.youtube.com/watch?v=drC7XQqWca8

Testing on my server, if you spawn a handful of these but not enough to crash the server within seconds. The lag detector will detect some lag but then it will say it has subsided after a minute. I guess I would have to figure out a more suitable configuration in that case?

The addon does well at detecting lag and executing the commands when spamming a bunch of props in a tight location.
Poukov 16 Mar 2022 @ 18:47 
work without ulx?
A_pet_tick 18 Ara 2020 @ 21:27 
Ok so this breaks stormfox. Why? How even? I spent so much time disabling addons individially. How is this the culprit lol
>KB> >KEKSQUAD 9 Eki 2020 @ 2:55 
As in it prevents that addon from parsing any presets set
>KB> >KEKSQUAD 9 Eki 2020 @ 2:55 
This conflicts with Weapon Editor and Replacer
Niobium 29 Mar 2020 @ 18:30 
anyway to execute multiple commands with lagdet_execute ?
echofox 31 Oca 2019 @ 18:20 
i havent got a lot of lag after i subd to this
:steamhappy:
Fidel ₵ashflow 11 Ağu 2018 @ 16:17 
[ERROR] lua/autorun/server/lagdetector.lua:176: bad argument #1 to 'band' (number expected, got nil)
1. band - [C]:-1
2. fn - lua/autorun/server/lagdetector.lua:176
3. unknown - lua/ulib/shared/hook.lua:109

2tbc1887 14 Ara 2017 @ 1:32 
I love this!