Adds fox metrics

This commit is contained in:
AffectedArc07
2021-08-15 22:26:37 +01:00
parent dcad17408b
commit ac9ff5359f
10 changed files with 58 additions and 1 deletions

View File

@@ -11,6 +11,11 @@ SUBSYSTEM_DEF(acid)
/datum/controller/subsystem/acid/stat_entry() /datum/controller/subsystem/acid/stat_entry()
..("P:[processing.len]") ..("P:[processing.len]")
/datum/controller/subsystem/acid/get_metrics()
. = ..()
var/list/cust = list()
cust["processing"] = length(processing)
.["custom"] = cust
/datum/controller/subsystem/acid/fire(resumed = 0) /datum/controller/subsystem/acid/fire(resumed = 0)
if(!resumed) if(!resumed)

View File

@@ -70,6 +70,7 @@ SUBSYSTEM_DEF(air)
. = ..() . = ..()
var/list/cust = list() var/list/cust = list()
cust["active_turfs"] = length(active_turfs) cust["active_turfs"] = length(active_turfs)
cust["hotspots"] = length(hotspots)
.["custom"] = cust .["custom"] = cust
/datum/controller/subsystem/air/Initialize(timeofday) /datum/controller/subsystem/air/Initialize(timeofday)

View File

@@ -12,6 +12,12 @@ SUBSYSTEM_DEF(fires)
..("P:[processing.len]") ..("P:[processing.len]")
/datum/controller/subsystem/fires/get_metrics()
. = ..()
var/list/cust = list()
cust["processing"] = length(processing)
.["custom"] = cust
/datum/controller/subsystem/fires/fire(resumed = 0) /datum/controller/subsystem/fires/fire(resumed = 0)
if(!resumed) if(!resumed)
src.currentrun = processing.Copy() src.currentrun = processing.Copy()

View File

@@ -61,6 +61,19 @@ SUBSYSTEM_DEF(garbage)
msg += " | Fail:[fail_counts.Join(",")]" msg += " | Fail:[fail_counts.Join(",")]"
..(msg) ..(msg)
/datum/controller/subsystem/garbage/get_metrics()
. = ..()
var/list/cust = list()
cust["gcr"] = (gcedlasttick / (delslasttick + gcedlasttick))
cust["total_harddels"] = totaldels
cust["total_softdels"] = totalgcs
var/i = 0
for(var/list/L in queues)
i++
.["queue_[i]"] = length(L)
.["custom"] = cust
/datum/controller/subsystem/garbage/Shutdown() /datum/controller/subsystem/garbage/Shutdown()
//Adds the del() log to the qdel log file //Adds the del() log to the qdel log file
var/list/dellog = list() var/list/dellog = list()

View File

@@ -11,6 +11,14 @@ SUBSYSTEM_DEF(lighting)
/datum/controller/subsystem/lighting/stat_entry() /datum/controller/subsystem/lighting/stat_entry()
..("L:[length(sources_queue)]|C:[length(corners_queue)]|O:[length(objects_queue)]") ..("L:[length(sources_queue)]|C:[length(corners_queue)]|O:[length(objects_queue)]")
/datum/controller/subsystem/lighting/get_metrics()
. = ..()
var/list/cust = list()
cust["sources_queue"] = length(sources_queue)
cust["corners_queue"] = length(corners_queue)
cust["objects_queue"] = length(objects_queue)
.["custom"] = cust
/datum/controller/subsystem/lighting/Initialize(timeofday) /datum/controller/subsystem/lighting/Initialize(timeofday)
if(!initialized) if(!initialized)
if(GLOB.configuration.general.starlight) if(GLOB.configuration.general.starlight)

View File

@@ -20,6 +20,12 @@ SUBSYSTEM_DEF(machines)
fire() fire()
return ..() return ..()
/datum/controller/subsystem/machines/get_metrics()
. = ..()
var/list/cust = list()
cust["processing"] = length(processing)
.["custom"] = cust
/datum/controller/subsystem/machines/proc/makepowernets() /datum/controller/subsystem/machines/proc/makepowernets()
for(var/datum/powernet/PN in powernets) for(var/datum/powernet/PN in powernets)
qdel(PN) qdel(PN)

View File

@@ -12,6 +12,11 @@ SUBSYSTEM_DEF(spacedrift)
/datum/controller/subsystem/spacedrift/stat_entry() /datum/controller/subsystem/spacedrift/stat_entry()
..("P:[processing.len]") ..("P:[processing.len]")
/datum/controller/subsystem/spacedrift/get_metrics()
. = ..()
var/list/cust = list()
cust["processing"] = length(processing)
.["custom"] = cust
/datum/controller/subsystem/spacedrift/fire(resumed = 0) /datum/controller/subsystem/spacedrift/fire(resumed = 0)
if(!resumed) if(!resumed)

View File

@@ -15,6 +15,12 @@ SUBSYSTEM_DEF(throwing)
/datum/controller/subsystem/throwing/stat_entry() /datum/controller/subsystem/throwing/stat_entry()
..("P:[processing.len]") ..("P:[processing.len]")
/datum/controller/subsystem/throwing/get_metrics()
. = ..()
var/list/cust = list()
cust["processing"] = length(processing)
.["custom"] = cust
/datum/controller/subsystem/throwing/fire(resumed = 0) /datum/controller/subsystem/throwing/fire(resumed = 0)
if(!resumed) if(!resumed)
src.currentrun = processing.Copy() src.currentrun = processing.Copy()

View File

@@ -3,6 +3,7 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
/datum/controller/subsystem/tickets/mentor_tickets/New() /datum/controller/subsystem/tickets/mentor_tickets/New()
NEW_SS_GLOBAL(SSmentor_tickets) NEW_SS_GLOBAL(SSmentor_tickets)
PreInit() PreInit()
ss_id = "mentor_tickets"
/datum/controller/subsystem/tickets/mentor_tickets /datum/controller/subsystem/tickets/mentor_tickets
name = "Mentor Tickets" name = "Mentor Tickets"

View File

@@ -9,11 +9,17 @@ SUBSYSTEM_DEF(weather)
flags = SS_BACKGROUND flags = SS_BACKGROUND
wait = 10 wait = 10
runlevels = RUNLEVEL_GAME runlevels = RUNLEVEL_GAME
offline_implications = "Ash storms will no longer trigger. No immediate action is needed." offline_implications = "Ash storms will no longer trigger. No immediate action is needed."
var/list/processing = list() var/list/processing = list()
var/list/eligible_zlevels = list() var/list/eligible_zlevels = list()
var/list/next_hit_by_zlevel = list() //Used by barometers to know when the next storm is coming var/list/next_hit_by_zlevel = list() //Used by barometers to know when the next storm is coming
/datum/controller/subsystem/weather/get_metrics()
. = ..()
var/list/cust = list()
cust["processing"] = length(processing)
.["custom"] = cust
/datum/controller/subsystem/weather/fire() /datum/controller/subsystem/weather/fire()
// process active weather // process active weather
for(var/V in processing) for(var/V in processing)