Fix GeoLite crash, add PerfMode profiling, reload cache invalidation
- GeoLite/MaxMind lookup wrapped in try/catch and disabled for the session on failure (stops the per-tick exception spam when the assembly cannot load during hot-reload) - New PerfMode config option: writes performance logs to logs/perf_<date>.txt (DisableAll/SetSkill/PlayerDeath totals, per-skill SkillAction timings, aggregated OnTick/CheckTransmit avg-max summaries) - css_reload now invalidates the skill-info and freeze-time caches - Removed the last null-forgiving player lookups (Command, Armored, Baseball, FriendlyFire, OneShot)
This commit is contained in:
parent
25cd8eb989
commit
b68a033b4c
14 changed files with 157 additions and 10 deletions
|
|
@ -114,7 +114,15 @@ namespace src
|
|||
return type.GetMethod(key.Method, BindingFlags.Static | BindingFlags.Public);
|
||||
});
|
||||
|
||||
return method?.Invoke(null, param);
|
||||
if (method == null) return null;
|
||||
|
||||
if (!PerfLog.Enabled)
|
||||
return method.Invoke(null, param);
|
||||
|
||||
long perfStart = PerfLog.Start();
|
||||
var result = method.Invoke(null, param);
|
||||
PerfLog.End($"SkillAction {skill}.{methodName}", perfStart, 2.0);
|
||||
return result;
|
||||
}
|
||||
|
||||
internal new void AddCommand(string name, string description, CommandInfo.CommandCallback handler)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue