Track time to queuedInsert in feedback (#80521)

Investigating large lag spikes in round start and noticed a large amount
of overtime (3s worth) to queuedInsert.

It's vending machines and R&D, but let's keep an eye on this.
This commit is contained in:
Mothblocks
2023-12-23 22:05:17 -05:00
committed by GitHub
parent b68ca9c1c4
commit 60ce61b29d
+5
View File
@@ -366,6 +366,9 @@ GLOBAL_LIST_EMPTY(asset_datums)
I = icon(I, icon_state=icon_state, dir=dir, frame=frame, moving=moving)
if (!I || !length(icon_states(I))) // that direction or state doesn't exist
return
var/start_usage = world.tick_usage
//any sprite modifications we want to do (aka, coloring a greyscaled asset)
I = ModifyInserted(I)
var/size_id = "[I.Width()]x[I.Height()]"
@@ -393,6 +396,8 @@ GLOBAL_LIST_EMPTY(asset_datums)
sizes[size_id] = size = list(1, I, null)
sprites[sprite_name] = list(size_id, 0)
SSblackbox.record_feedback("tally", "spritesheet_queued_insert_time", TICK_USAGE_TO_MS(start_usage), name)
/**
* A simple proc handing the Icon for you to modify before it gets turned into an asset.
*