Hard Del Tracking Tweaks (#22570)

The typical hard del costs 300ms of time, but Hard Dels only get
reported to the Sentry logs if they exceed 500ms, which only an
extremely tiny minority of them ever get past. In actual practice we
only need to ignore the hard dels that are under 200ms because only the
two "Roundstart subsystem hard dels" will ever be below that number and
can be ignored. ALL other hard dels should be reported with the details
required to fix them, especially so that I can have actually usable
information about what is causing them and what I need to fix.
This commit is contained in:
VMSolidus
2026-06-01 15:04:34 +00:00
committed by GitHub
parent 1b54762d36
commit 752496d91f
2 changed files with 17 additions and 1 deletions
+13 -1
View File
@@ -306,6 +306,18 @@ SUBSYSTEM_DEF(garbage)
if (time > 0.1 SECONDS)
postpone(time)
// Standard sentry logging for hard dels other than the two subsystems that will always hard del every round
var/sentry_threshold = 0.25 SECONDS
if (time > sentry_threshold && SSsentry)
SSsentry.capture_message(
"Hard delete: [type]",
"warning",
"garbage",
tags = list("datum_type" = "[type]"),
extra = list("ref_id" = refID, "time_ms" = tick_usage, "details" = detail)
)
var/threshold = 0.5 // Used to be CONFIG_GET(number/hard_deletes_overrun_threshold)
if (threshold && (time > threshold SECONDS))
if (!(type_info.qdel_flags & QDEL_ITEM_ADMINS_WARNED))
@@ -318,7 +330,7 @@ SUBSYSTEM_DEF(garbage)
"warning",
"garbage",
tags = list("datum_type" = "[type]"),
extra = list("ref_id" = refID, "time_ms" = tick_usage)
extra = list("ref_id" = refID, "time_ms" = tick_usage, "details" = detail)
)
type_info.hard_deletes_over_threshold++
var/overrun_limit = 0 // Used to be CONFIG_GET(number/hard_deletes_overrun_limit)