Git Product home page Git Product logo

gmod_perfutils's Introduction

๐Ÿ’ป gmod_perfutils

Various scripts I've made over the years to find performance bottle necks in garrysmod.

Installation

Either clone/download the repository and put it in your addons/ folder or run the individual files, the files are designed to be able to be ran by themselves.

Usage

File Commands Description
sh_hookperf.lua red_sv_hookperf red_cl_hookperf This script will log the time taken to run each hook over the span of the amount of time give, defaults to 10 seconds. This can be useful to find laggy hooks without having to use something as heavy as FProfiler as that can cause significiant lag while active, thus being hard to use on servers.
sh_hookorder.lua red_sv_hookorder red_cl_hookorder This script will print out the order in which hooks are called. This can be useful to determine if a hook is returning early and preventing other hooks from being called. Also shows the time taken to run each hook.
sh_netperf.lua red_sv_netperf_start red_cl_netperf_start red_sv_netperf_stop red_cl_netperf_stop This script will detour all net receivers log the amount of bytes received and the time taken to process the message. This can be useful to reduce networking load on both server and client.
sh_indexcounter.lua red_sv_indexcounter red_cl_indexcounter This script will count the amount of __index metamethod calls on entities. The more the worse, entity indexing is significiantly slower than using the entity table directly (ent:GetTable()).
sv_net_dumper.lua red_sv_netdump This script will find all net.Receive function origins and dump their files to the data folder. This can be useful for locating badly performing hooks and exploits.

Extra tools

Tools i often use and can recommend for performance profiling.

Tool Description
FProfiler A tool that can be used to profile lua code. It can be used to find performance bottlenecks in your code after you've determined them being an issue with +showbudget or +showvprof.
concmd +showbudget Shows the budget panel in the top right corner of the screen. This shows how long each frame is taking to render, super useful as the first step in finding performance issues. This isn't limited to lua either which is a big bonus.
concmd +showvprof Shows the vprof panel, has detailed information about costs.

gmod_perfutils's People

Contributors

shockpast avatar wrefgtzweve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

shockpast

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.