feat(ugc): a model's time keeps its icon's when the icon is drawn again

A make's recorded time (process_ms, stats.json's ms.total) includes the
icon drawn at its end. Drawing only the icons again (the icon editor's
Draw all icons of this type again) left the stats and the rows with the
old icons' time. Now the icon-only job writes stats.json with the new
icon's time (ms.icon, ms.total changed by the difference,
UgcJobs::WithIconTime) and the main thread changes the row's process_ms
and process_cpu_ms by the same difference (the icon is drawn on one
thread, so its time is taken as its CPU time). The dashboard's Took,
CPU and totals follow.

Check: open a player model on the UGC page, Draw all icons of this type
again: afterwards its Took changes by the icon's difference and its
stats show the new icon time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 06:17:43 -05:00
parent fd141c232b
commit fcd939a92f
6 changed files with 60 additions and 1 deletions

View File

@@ -197,6 +197,7 @@ private:
double cpuMilliseconds{}; // the worker thread's CPU time for it
uint64_t memoryEstimate{}; // the bytes it was estimated to need (the memory budget's figure)
bool iconOnly{};
double iconChangeMs{}; // an icon drawn again: how much longer it took than the icon made before
std::vector<Checksum> checksums; // of the files written that the client downloads as sd0
};
@@ -217,6 +218,8 @@ private:
UgcIconParams::Values IconValues(const std::string& kind, const std::string& itemTarget);
void Collect();
void Record(const Done& done);
// Main thread: a model whose icon was drawn again took `changeMs` longer to make (its icon's share of the make)
void RecordIconTime(LWOOBJID id, double changeMs);
void Worker();
void SampleUsage();