Skip to content

Commit

Permalink
Move memstat logs to profiler subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Dec 26, 2024
1 parent cf20dba commit ccc06bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion monkestation/code/__HELPERS/files.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var/regex/whitelist_regex
if(whitelist)
// try not to look at it too hard. yes i wrote this by hand.
whitelist_regex = new("(?:\[\\/\\\\\]$|(?:^|\\\\|\\/)(?:[regex_quote_list(whitelist)]|(?:profiler|sendmaps)-\[0-9_\\-\]+|(?:meowtonin-(?:panic-)?\[0-9_\\-\]+))\\.(?:[regex_quote_list(valid_extensions)])$)", "i")
whitelist_regex = new("(?:\[\\/\\\\\]$|(?:^|\\\\|\\/)(?:[regex_quote_list(whitelist)]|(?:profiler|sendmaps|memstat)-\[0-9_\\-\]+|(?:meowtonin-(?:panic-)?\[0-9_\\-\]+))\\.(?:[regex_quote_list(valid_extensions)])$)", "i")

// wow why was this ever a parameter
var/root = "data/logs/"
Expand Down
3 changes: 2 additions & 1 deletion monkestation/code/controllers/subsystem/memory_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ SUBSYSTEM_DEF(memory_stats)
/datum/controller/subsystem/memory_stats/fire(resumed)
var/memory_summary = get_memory_stats()
if(memory_summary)
aneri_file_write(memory_summary, "data/mem_stat/[GLOB.round_id]-memstat.txt")
var/timestamp = time2text(world.timeofday, "YYYY-MM-DD_hh-mm-ss")
aneri_file_write(json_encode(stats), "[GLOB.log_directory]/profiler/memstat-[timestamp].json")

/datum/controller/subsystem/memory_stats/proc/get_memory_stats()
if(!aneri_file_exists(MEMORYSTATS_DLL_PATH))
Expand Down

0 comments on commit ccc06bb

Please sign in to comment.