SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 01/04/2020, 09:23 AM   #1
Janoz12
Little Clucker
 
Join Date: Aug 2016
Posts: 27
Reputation: 2
Default 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.
Janoz12 is offline   Reply With Quote
Old 01/04/2020, 09:37 AM   #2
Calisthenics
High-roller
 
Join Date: May 2018
Posts: 1,228
Reputation: 205
Default Re: How can I find out how much broadband a function uses?

Profiler Plugin
__________________
Calisthenics is offline   Reply With Quote
Old 01/04/2020, 09:51 AM   #3
Janoz12
Little Clucker
 
Join Date: Aug 2016
Posts: 27
Reputation: 2
Default 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.
Janoz12 is offline   Reply With Quote
Old 01/04/2020, 10:10 AM   #4
Adamoneoone
Huge Clucker
 
Join Date: Sep 2014
Posts: 485
Reputation: 37
Default 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.
Adamoneoone is offline   Reply With Quote
Old 01/04/2020, 10:18 AM   #5
Janoz12
Little Clucker
 
Join Date: Aug 2016
Posts: 27
Reputation: 2
Default 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.
Janoz12 is offline   Reply With Quote
Old 01/04/2020, 10:28 AM   #6
Adamoneoone
Huge Clucker
 
Join Date: Sep 2014
Posts: 485
Reputation: 37
Default 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.
Adamoneoone is offline   Reply With Quote
Old 01/04/2020, 11:06 AM   #7
Janoz12
Little Clucker
 
Join Date: Aug 2016
Posts: 27
Reputation: 2
Default Re: How can I find out how much broadband a function uses?

Yes

server.cfg:

profile_gamemode <1>
profile_format <html>
Janoz12 is offline   Reply With Quote
Old 01/04/2020, 11:46 AM   #8
Calisthenics
High-roller
 
Join Date: May 2018
Posts: 1,228
Reputation: 205
Default Re: How can I find out how much broadband a function uses?

Quote:
Originally Posted by Janoz12 View Post
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
__________________
Calisthenics is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant Find the function to use undeteker Scripting Help 0 11/06/2016 07:56 AM
Unable to find file or function Stones Server Support 5 22/05/2014 03:14 PM
a function that find the closest object to me Gennum. Scripting Help 7 20/12/2012 02:29 PM
Help me to find the math function WooTFTW Scripting Help 2 22/12/2011 04:29 PM
[Help] I can't find a function InsaniManES Scripting Help 3 24/10/2011 03:28 PM


All times are GMT. The time now is 01:08 AM.


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