mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
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>
34 lines
1.8 KiB
SQL
34 lines
1.8 KiB
SQL
/* 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)
|
|
);
|