mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
feat(ugc): processing options per make, recorded per model with their times
Staff can make models again with other processing options than the UGC
settings' (ray backend, hidden-face method, denoising) and every make records
what made it, for comparing the options.
- migration mysql 99 / sqlite 82 (ugc_process_options): ugc.process_options
(picked for the next make, cleared once made), ugc.made_options (what made
the current files) and ugc_process_runs (every successful make: options,
wall and CPU time, hidden faces', occlusion's and icon's time, bricks,
triangles before and after)
- IUgc: ResetUgcModelProcessing and ResetPropertyUgcModelProcessing take the
options; PendingModel carries them; RecordUgcModelRun, GetUgcRunSummaries;
list entries have madeOptions and processOptions
- the UGC server applies a job's options over its settings and records the run
- /api/ugc/reprocess takes options ("embree fast oidn"); /api/ugc/options
lists the choices, the settings' defaults and averages per combination
- /reprocessproperty [builtin|embree|hiprt] [toolbox|fast] [off|oidn], any
order, all optional
Check: run the migration on MySQL and SQLite; /reprocessproperty embree fast
on a property, then the models' made_options and ugc_process_runs rows;
/api/ugc/options.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
33
migrations/dlu/mysql/99_ugc_process_options.sql
Normal file
33
migrations/dlu/mysql/99_ugc_process_options.sql
Normal file
@@ -0,0 +1,33 @@
|
||||
/* UGC server processing options (docs/UgcServer.md, "Processing options"): ugc.process_options holds the options staff
|
||||
picked for a model's next make (the dashboard's make again, /reprocessproperty), as "embree fast oidn"; empty: the
|
||||
UGC settings'. Cleared once the model is made. ugc.made_options is what made the model's current files ("embree
|
||||
toolbox off"; empty for models made before). ugc_process_runs has every successful make of a model with its options,
|
||||
times and triangles, for the dashboard's comparison of the options. */
|
||||
SET @dlu_column = (SELECT IF(COUNT(*) = 0, 'ALTER TABLE ugc ADD COLUMN process_options VARCHAR(64) NOT NULL DEFAULT ''''', 'DO 0') FROM information_schema.columns
|
||||
WHERE table_schema = DATABASE() AND table_name = 'ugc' AND column_name = 'process_options');
|
||||
PREPARE dlu_column_stmt FROM @dlu_column;
|
||||
EXECUTE dlu_column_stmt;
|
||||
DEALLOCATE PREPARE dlu_column_stmt;
|
||||
|
||||
SET @dlu_column = (SELECT IF(COUNT(*) = 0, 'ALTER TABLE ugc ADD COLUMN made_options VARCHAR(64) NOT NULL DEFAULT ''''', 'DO 0') FROM information_schema.columns
|
||||
WHERE table_schema = DATABASE() AND table_name = 'ugc' AND column_name = 'made_options');
|
||||
PREPARE dlu_column_stmt FROM @dlu_column;
|
||||
EXECUTE dlu_column_stmt;
|
||||
DEALLOCATE PREPARE dlu_column_stmt;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ugc_process_runs (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
ugc_id BIGINT NOT NULL,
|
||||
options VARCHAR(64) NOT NULL,
|
||||
made_at BIGINT NOT NULL,
|
||||
process_ms INT UNSIGNED NOT NULL,
|
||||
process_cpu_ms INT UNSIGNED NOT NULL,
|
||||
hsr_ms INT UNSIGNED NOT NULL,
|
||||
ao_ms INT UNSIGNED NOT NULL,
|
||||
icon_ms INT UNSIGNED NOT NULL,
|
||||
bricks INT UNSIGNED NOT NULL,
|
||||
triangles_before INT UNSIGNED NOT NULL,
|
||||
triangles INT UNSIGNED NOT NULL,
|
||||
INDEX ugc_process_runs_options (options),
|
||||
INDEX ugc_process_runs_ugc_id (ugc_id)
|
||||
);
|
||||
21
migrations/dlu/sqlite/82_ugc_process_options.sql
Normal file
21
migrations/dlu/sqlite/82_ugc_process_options.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
/* UGC server processing options: what staff picked for a model's next make, what made it, and every make's options and
|
||||
times. See the MySQL migration. */
|
||||
ALTER TABLE ugc ADD COLUMN process_options TEXT NOT NULL DEFAULT '';
|
||||
ALTER TABLE ugc ADD COLUMN made_options TEXT NOT NULL DEFAULT '';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ugc_process_runs (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
ugc_id BIGINT NOT NULL,
|
||||
options TEXT NOT NULL,
|
||||
made_at BIGINT NOT NULL,
|
||||
process_ms INTEGER NOT NULL,
|
||||
process_cpu_ms INTEGER NOT NULL,
|
||||
hsr_ms INTEGER NOT NULL,
|
||||
ao_ms INTEGER NOT NULL,
|
||||
icon_ms INTEGER NOT NULL,
|
||||
bricks INTEGER NOT NULL,
|
||||
triangles_before INTEGER NOT NULL,
|
||||
triangles INTEGER NOT NULL
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS ugc_process_runs_options ON ugc_process_runs (options);
|
||||
CREATE INDEX IF NOT EXISTS ugc_process_runs_ugc_id ON ugc_process_runs (ugc_id);
|
||||
Reference in New Issue
Block a user