SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Scripting Help (https://forum.sa-mp.com/forumdisplay.php?f=12)
-   -   How can I find out how much broadband a function uses? (https://forum.sa-mp.com/showthread.php?t=673645)

Janoz12 01/04/2020 09:23 AM

How can I find out how much broadband a function uses?
 
How can I find out how much broadband a function uses?

I have a kind of bottleneck on my server, which at some point begins to lag my users.

Unfortunately, I don't know what exactly is consuming more broadband than normal.

I would like to be able to use a kind of 'crashdetect' but to tell me what timers, functions, callbacks are running and how much broadband they consume, in order to determine where the problem is.

Calisthenics 01/04/2020 09:37 AM

Re: How can I find out how much broadband a function uses?
 
Profiler Plugin

Janoz12 01/04/2020 09:51 AM

Re: How can I find out how much broadband a function uses?
 
Could you explain how to use it?

I installed it but absolutely nothing happens.

Adamoneoone 01/04/2020 10:10 AM

Re: How can I find out how much broadband a function uses?
 
If you installed it correctly, when you launch your server in the console window you'll see a few lines with [profiler] prefix if i'm not mistaken.
Join your server and do your testing, then type exit in the console window.
You'll then find a profiler file in your gamemodes / filterscripts folders with the same name as the file profiled by the plugin.

Janoz12 01/04/2020 10:18 AM

Re: How can I find out how much broadband a function uses?
 
I did everything as is in the readme but nothing comes with prefix [profiler] in the console.

Adamoneoone 01/04/2020 10:28 AM

Re: How can I find out how much broadband a function uses?
 
Did you put the profiler.dll /.so in plugins? Then added the profiler lines in the server.cfg? If you did everything correctly, it should load.

Janoz12 01/04/2020 11:06 AM

Re: How can I find out how much broadband a function uses?
 
Yes :(

server.cfg:

profile_gamemode <1>
profile_format <html>

Calisthenics 01/04/2020 11:46 AM

Re: How can I find out how much broadband a function uses?
 
Quote:

Originally Posted by Janoz12 (Post 4137068)
Yes :(

server.cfg:

profile_gamemode <1>
profile_format <html>

pawn Code:
profiler_gamemodes gamemode_filename_here
profiler_outputformat html
profiler_callgraph 1
gamemode_filename_here without any extension. If your gamemode is called main.pwn and compiles to main.amx, you just write
pawn Code:
profiler_gamemodes main


All times are GMT. The time now is 12:40 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.