diff --git a/code/controllers/subsystem/profiler.dm b/code/controllers/subsystem/profiler.dm index 4b3a1a99711783..629590d75ebbca 100644 --- a/code/controllers/subsystem/profiler.dm +++ b/code/controllers/subsystem/profiler.dm @@ -1,11 +1,8 @@ -#define PROFILER_FILENAME "profiler.json" -#define SENDMAPS_FILENAME "sendmaps.json" - SUBSYSTEM_DEF(profiler) name = "Profiler" init_order = INIT_ORDER_PROFILER runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY - wait = 3000 + wait = 300 SECONDS var/fetch_cost = 0 var/write_cost = 0 @@ -49,12 +46,12 @@ SUBSYSTEM_DEF(profiler) if(!length(current_profile_data)) //Would be nice to have explicit proc to check this stack_trace("Warning, profiling stopped manually before dump.") - var/prof_file = file("[GLOB.log_directory]/[PROFILER_FILENAME]") + var/prof_file = file("[GLOB.log_directory]/profiler/profiler-[round(world.time * 0.1, 10)].json") if(fexists(prof_file)) fdel(prof_file) if(!length(current_sendmaps_data)) //Would be nice to have explicit proc to check this stack_trace("Warning, sendmaps profiling stopped manually before dump.") - var/sendmaps_file = file("[GLOB.log_directory]/[SENDMAPS_FILENAME]") + var/sendmaps_file = file("[GLOB.log_directory]/profiler/sendmaps-[round(world.time * 0.1, 10)].json") if(fexists(sendmaps_file)) fdel(sendmaps_file) @@ -63,5 +60,3 @@ SUBSYSTEM_DEF(profiler) WRITE_FILE(sendmaps_file, current_sendmaps_data) write_cost = MC_AVERAGE(write_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) -#undef PROFILER_FILENAME -#undef SENDMAPS_FILENAME