Skip to content

Add the Performance Test task type (fos#55) - #1981

Merged
fog-workflows[bot] merged 2 commits into
working-1.6from
feat/perftest-tasktype
Oct 27, 2026
Merged

fog-workflows[bot] merged 2 commits into
working-1.6from
feat/perftest-tasktype

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Server half of FOGProject/fos#55. The FOS half is FOGProject/fos#198, which merges after this.

Adds the Performance Test advanced task type. FOS boots with mode=perftest, times the disk, the network and decompression, and posts the result. The host page keeps every run.

  • Schema step 444: taskType 27 'Performance Test' (mode=perftest, advanced, host and group), and table hostPerfTests (one row per run, FK to hosts with CASCADE). FOG_SCHEMA is now 444.
  • service/perftest.php: refuses an unknown host, a host with no active Performance Test task, and any invalid field. It saves one row and answers ##. The rules live in HostPerfTest::refusal()/validate(), so the tests run them without a DB.
  • Host page: a read-only Performance tab under History, newest first. It shows the disk, network and decompress MB/s, the compression ratio, and which stage limits imaging.
  • Tests: tests/perftest-report.test.php, 46 checks. Proven red: dropping the task-type check fails 4, and dropping the format whitelist fails 2. Tests that pinned the old schema numbers were updated.

tests/run-all.sh: 412 passed, 0 failed. Both phpstan passes are clean, unscoped. The new _() strings are not in messages.pot yet; the CI regen job adds them.

🤖 Generated with Claude Code

FOS can now boot with mode=perftest. It times the disk, the network and
decompression on the client, then reports the result before it completes
the task. The task changes nothing on the disk.

Schema step 444 adds task type 27 and the hostPerfTests table. The rows
go with the host (CASCADE, group 14). The task id is an audit column with
no constraint, like taskLog.taskID.

service/perftest.php takes the report. It has no credential, so it refuses
unless the host has a Performance Test task in flight. It also checks
every field and names the bad one in the refusal. FOS treats the body
`##` as success. The rules are in HostPerfTest::refusal() so a test can
drive them without a database.

The host page has a read-only Performance tab under History Items. It
lists the runs newest first. A rate of 0 shows as "not measured". A ratio
of 250 shows as 2.50:1.

The new tests/perftest-report.test.php covers the refusals and the
formatting. Three existing tests pinned numbers that this step moves:
the foreign-key counts in two docs, the rehearsal baseline, and the
"step 443 is the last step" check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fog-workflows
fog-workflows Bot enabled auto-merge October 27, 2026 15:11
@fog-workflows
fog-workflows Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into working-1.6 with commit 7783ee2 Oct 27, 2026
10 checks passed
@fog-workflows
fog-workflows Bot deleted the feat/perftest-tasktype branch October 27, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant