You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, you cannot know which hooks CLuaGamemode::Call, CLuaGamemode::CallWithArgs and CLuaGamemode::CallFinish call which should be changed.
They should include the hook name in Vprof which would allow one to make it far easier to find any performance issues.
This should be relatively easy to implement and it would be really useful.
Example implementation for CLuaGamemode::CallFinish(same for other functions):
std::map<int, std::string> CallFinishStrs; // We need to save the std::string, because if it gets deleted VProf gets empty or garbage entriesvoidCLuaGamemode::CallFinish(int pool)
{
if (CallFinishStrs.find(pool) == CallFinishStrs.end())
{
std::string vprof = gLUA->GetPooledString(pool);
vprof = "CLuaGamemode::CallFinish (" + vprof + ")";
CallFinishStrs[pool] = vprof;
}
VPROF_BUDGET( CallFinishStrs[pool].c_str(), "GMOD" );
[...]
}
The text was updated successfully, but these errors were encountered:
RaphaelIT7
changed the title
Add hook names calls to vprof
Add hook names to vprof
Apr 30, 2024
Details
Currently, you cannot know which hooks
CLuaGamemode::Call
,CLuaGamemode::CallWithArgs
andCLuaGamemode::CallFinish
call which should be changed.They should include the hook name in Vprof which would allow one to make it far easier to find any performance issues.
This should be relatively easy to implement and it would be really useful.
Example implementation for
CLuaGamemode::CallFinish
(same for other functions):The text was updated successfully, but these errors were encountered: