Skip to content

RaphaelIT7/gmod-vprof

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project tries to improve vprof by adding new commands and convars.
NOTE: This project currently only works on 32x

What does this add?

Currently, this module adds two new convars.

vprof_showhooks

Enabled by default

Causes VProf to show the name of the Lua hooks getting called.

Gmod request: Facepunch/garrysmod-requests#2374

Example on Linux

CLuaGamemode::Call is listed twice because the first one is our custom one and the second one is the original.

       |  |  |  |  |  |  CLuaGamemode::Call (Think)
       |  |  |  |  |  |  |  CLuaGamemode::Call
       |  |  |  |  |  |  |  |  CBaseLuaInterface::GetType
       |  |  |  |  |  |  |  |  CLuaInterface::CallFunctionProtected

Example on Windows

On Windows, the results currently are different because I can't detour the CLuaGamemode without breaking it :<
So now you see the hook name in CLuaInterface::PushPooledString (Hook name here)

|  |  CLuaGamemode::Call
|  |  |  CLuaInterface::PushPooledString (Tick)
|  |  |  CBaseLuaInterface::GetType
|  |  |  CLuaInterface::CallFunctionProtected
|  |  |  CLuaInterface::PushPooledString (Think)

vprof_exportreport

Enabled by default

Causes VProf to export a report into a file in the vprof/ folder.

How to load

You can load it like any normal module by using require, but you can also load it like a server plugin.

require("vprof")
Plugin
{
	file		"lua/bin/gmsv_vprof_linux.dll"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published