Adds a config to change the interval profiler information gets saved (#83849)

## About The Pull Request
As title says

## Why It's Good For The Game
Important for server operation

---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
This commit is contained in:
Watermelon914
2024-06-14 05:54:47 +00:00
committed by GitHub
parent 3b5c9ec030
commit 9912961f9b
3 changed files with 7 additions and 0 deletions

View File

@@ -650,6 +650,9 @@
/datum/config_entry/flag/auto_profile
/datum/config_entry/number/profiler_interval
default = 300 SECONDS
/datum/config_entry/number/drift_dump_threshold
default = 4 SECONDS

View File

@@ -16,6 +16,7 @@ SUBSYSTEM_DEF(profiler)
StartProfiling()
else
StopProfiling() //Stop the early start profiler
wait = CONFIG_GET(number/profiler_interval)
return SS_INIT_SUCCESS
/datum/controller/subsystem/profiler/OnConfigLoad()

View File

@@ -482,6 +482,9 @@ DEFAULT_VIEW_SQUARE 15x15
## Enable automatic profiling - Byond 513.1506 and newer only.
#AUTO_PROFILE
## Determines the interval between each saved profiler snapshot (in deciseconds).
#PROFILER_INTERVAL 3000
## Threshold (in deciseconds) for real time between ticks before we start dumping profiles
DRIFT_DUMP_THRESHOLD 40