adjust conversion visualization; strip out old profiling markup

This commit is contained in:
Ryan Fleury
2024-02-10 19:40:19 -08:00
parent e7897f302f
commit 2e8afad5f0
6 changed files with 33 additions and 96 deletions
+1
View File
@@ -1802,6 +1802,7 @@ df_entity_alloc(DF_StateDeltaHistory *hist, DF_Entity *parent, DF_EntityKind kin
df_state->entities_id_gen += 1;
entity->id = df_state->entities_id_gen;
entity->generation += 1;
entity->alloc_time_us = os_now_microseconds();
// rjf: dirtify caches
df_state->kind_alloc_gens[kind] += 1;
+2
View File
@@ -430,6 +430,7 @@ struct DF_Entity
DF_EntityFlags flags;
DF_EntityID id;
U64 generation;
U64 alloc_time_us;
B32 deleted;
F32 alive_t;
@@ -1226,6 +1227,7 @@ read_only global DF_Entity df_g_nil_entity =
0,
0,
0,
0,
// rjf: allocationless, simple equipment
{0},
+12 -9
View File
@@ -4408,17 +4408,20 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
for(DF_EntityNode *n = tasks.first; n != 0; n = n->next)
{
DF_Entity *task = n->entity;
String8 raddbg_path = task->name;
String8 raddbg_name = str8_skip_last_slash(raddbg_path);
String8 task_text = push_str8f(scratch.arena, "Creating %S...", raddbg_name);
UI_Key key = ui_key_from_stringf(ui_key_zero(), "task_%p", task);
UI_Box *box = ui_build_box_from_key(UI_BoxFlag_DrawHotEffects|UI_BoxFlag_DrawText|UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawBackground|UI_BoxFlag_Clickable, key);
UI_Signal sig = ui_signal_from_box(box);
if(ui_hovering(sig)) UI_Tooltip
if(task->alloc_time_us + 500000 < os_now_microseconds())
{
ui_label(raddbg_path);
String8 raddbg_path = task->name;
String8 raddbg_name = str8_skip_last_slash(raddbg_path);
String8 task_text = push_str8f(scratch.arena, "Creating %S...", raddbg_name);
UI_Key key = ui_key_from_stringf(ui_key_zero(), "task_%p", task);
UI_Box *box = ui_build_box_from_key(UI_BoxFlag_DrawHotEffects|UI_BoxFlag_DrawText|UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawBackground|UI_BoxFlag_Clickable, key);
UI_Signal sig = ui_signal_from_box(box);
if(ui_hovering(sig)) UI_Tooltip
{
ui_label(raddbg_path);
}
ui_box_equip_display_string(box, task_text);
}
ui_box_equip_display_string(box, task_text);
}
scratch_end(scratch);
}