Skip to content

Commit

Permalink
Revert "Profiler logs now sort by overtime and have a proper timestam…
Browse files Browse the repository at this point in the history
…p in the…"

This reverts commit d5d32d5.
  • Loading branch information
Absolucy authored Sep 28, 2024
1 parent a991873 commit 3dbfa93
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 83 deletions.
4 changes: 0 additions & 4 deletions code/__HELPERS/~monkestation-helpers/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@
/// Use when you want a list of most to least severe wounds.
/proc/cmp_wound_severity_dsc(datum/wound/a, datum/wound/b)
return cmp_numeric_dsc(a.severity, b.severity)

/// Used to sort overtime in profiling data.
/proc/sort_overtime_dsc(list/a, list/b)
return b["over"] - a["over"]
2 changes: 0 additions & 2 deletions code/controllers/subsystem/init_profiler.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* monkestation edit: reimplemented in [monkestation\code\controllers\subsystem\init_profiler.dm]
#define INIT_PROFILE_NAME "init_profiler.json"

///Subsystem exists so we can separately log init time costs from the costs of general operation
Expand Down Expand Up @@ -27,4 +26,3 @@ SUBSYSTEM_DEF(init_profiler)
world.Profile(PROFILE_CLEAR) //Now that we're written this data out, dump it. We don't want it getting mixed up with our current round data

#undef INIT_PROFILE_NAME
monkestation end */
5 changes: 1 addition & 4 deletions code/controllers/subsystem/profiler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ SUBSYSTEM_DEF(profiler)
var/fetch_cost = 0
var/write_cost = 0

/* monkestation edit: reimplemented in [monkestation\code\controllers\subsystem\profiler.dm]
/datum/controller/subsystem/profiler/stat_entry(msg)
msg += "F:[round(fetch_cost,1)]ms"
msg += "|W:[round(write_cost,1)]ms"
return msg
monkestation end */

/datum/controller/subsystem/profiler/Initialize()
if(CONFIG_GET(flag/auto_profile))
Expand Down Expand Up @@ -39,7 +37,6 @@ monkestation end */
world.Profile(PROFILE_STOP, type = "sendmaps")


/* monkestation edit: reimplemented in [monkestation\code\controllers\subsystem\profiler.dm]
/datum/controller/subsystem/profiler/proc/DumpFile()
var/timer = TICK_USAGE_REAL
var/current_profile_data = world.Profile(PROFILE_REFRESH, format = "json")
Expand All @@ -62,4 +59,4 @@ monkestation end */
WRITE_FILE(prof_file, current_profile_data)
WRITE_FILE(sendmaps_file, current_sendmaps_data)
write_cost = MC_AVERAGE(write_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
monkestation end */

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_\\-\]+)\\.(?:[regex_quote_list(valid_extensions)])$)", "i")
whitelist_regex = new("(?:\[\\/\\\\\]$|(?:^|\\\\|\\/)(?:[regex_quote_list(whitelist)]|(?:profiler|sendmaps)-\[0-9\]+)\\.(?:[regex_quote_list(valid_extensions)])$)", "i")

// wow why was this ever a parameter
var/root = "data/logs/"
Expand Down
28 changes: 0 additions & 28 deletions monkestation/code/controllers/subsystem/init_profiler.dm

This file was deleted.

42 changes: 0 additions & 42 deletions monkestation/code/controllers/subsystem/profiler.dm

This file was deleted.

2 changes: 0 additions & 2 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5810,9 +5810,7 @@
#include "monkestation\code\controllers\subsystem\autotransfer.dm"
#include "monkestation\code\controllers\subsystem\economy.dm"
#include "monkestation\code\controllers\subsystem\glowshroom.dm"
#include "monkestation\code\controllers\subsystem\init_profiler.dm"
#include "monkestation\code\controllers\subsystem\job.dm"
#include "monkestation\code\controllers\subsystem\profiler.dm"
#include "monkestation\code\datums\action.dm"
#include "monkestation\code\datums\dna.dm"
#include "monkestation\code\datums\emotes.dm"
Expand Down

0 comments on commit 3dbfa93

Please sign in to comment.