[MIRROR] performance logging (#1629)

* performance logging (#54809)

Dumps a bunch of perf info to a csv every 10 seconds.

Currently this info is only stored in blackbox where it's effectively useless.
csv is a very easy to parse format and is natively supported by a lot of data analysis tools

* performance logging

Co-authored-by: Rob Bailey <actioninja@gmail.com>
This commit is contained in:
SkyratBot
2020-11-08 05:03:16 +00:00
committed by GitHub
co-authored by Rob Bailey
parent f725fc5ea8
commit 0572d30cb0
4 changed files with 57 additions and 0 deletions
+25
View File
@@ -37,3 +37,28 @@ SUBSYSTEM_DEF(time_track)
last_tick_byond_time = current_byondtime
last_tick_tickcount = current_tickcount
SSblackbox.record_feedback("associative", "time_dilation_current", 1, list("[SQLtime()]" = list("current" = "[time_dilation_current]", "avg_fast" = "[time_dilation_avg_fast]", "avg" = "[time_dilation_avg]", "avg_slow" = "[time_dilation_avg_slow]")))
log_perf(
list(
world.time,
length(GLOB.clients),
time_dilation_current,
time_dilation_avg_fast,
time_dilation_avg,
time_dilation_avg_slow,
MAPTICK_LAST_INTERNAL_TICK_USAGE,
length(SStimer.timer_id_dict),
SSair.cost_turfs,
SSair.cost_groups,
SSair.cost_highpressure,
SSair.cost_hotspots,
SSair.cost_superconductivity,
SSair.cost_pipenets,
SSair.cost_rebuilds,
length(SSair.active_turfs),
length(SSair.excited_groups),
length(SSair.hotspots),
length(SSair.networks),
length(SSair.high_pressure_delta),
length(SSair.active_super_conductivity)
)
)