mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
SSmetrics - Elasticsearch powered metrics viewing
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
/datum/controller/subsystem
|
||||
// Metadata; you should define these.
|
||||
name = "fire codertrain" //name of the subsystem
|
||||
/// Subsystem ID. Used for when we need a technical name for the SS
|
||||
var/ss_id = "fire_codertrain_again"
|
||||
var/init_order = INIT_ORDER_DEFAULT //order of initialization. Higher numbers are initialized first, lower numbers later. Use defines in __DEFINES/subsystems.dm for easy understanding of order.
|
||||
var/wait = 20 //time to wait (in deciseconds) between each call to fire(). Must be a positive integer.
|
||||
var/priority = FIRE_PRIORITY_DEFAULT //When mutiple subsystems need to run in the same tick, higher priority subsystems will run first and be given a higher share of the tick before MC_TICK_CHECK triggers a sleep
|
||||
@@ -227,3 +229,14 @@
|
||||
if("queued_priority") //editing this breaks things.
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
// Returns the metrics for the subsystem.
|
||||
// This can be overriden on subtypes for variables that could affect tick usage
|
||||
// Example: ATs on SSair
|
||||
/datum/controller/subsystem/proc/get_metrics()
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
var/list/out = list()
|
||||
out["cost"] = cost
|
||||
out["tick_usage"] = tick_usage
|
||||
out["custom"] = list() // Override as needed on child
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user