apps/bbench - CPU, graphics, memory and disk benchmark for KolibriOS #561

Merged
Burer merged 8 commits from bbench-upload into main 2026-07-23 13:51:19 +00:00
Owner
  • Add bbench to IMG and System Panel
    • Universal benchmark with 17 tests for CPU, graphics, memory and disk
    • Tests can be toggled and configured
    • Generates derailed reports in HTML
  • Remove MGB and FSPEED from System Panel, move them from IMG to ISO
image.png
- Add `bbench` to IMG and System Panel - Universal benchmark with 17 tests for CPU, graphics, memory and disk - Tests can be toggled and configured - Generates derailed reports in HTML - Remove `MGB` and `FSPEED` from System Panel, move them from IMG to ISO <img alt="image.png" src="attachments/724df0b9-ec6d-4145-a701-cf86bb9a5591">
Leency requested review from Ghost 2026-07-09 22:58:26 +00:00
Leency requested review from Ghost 2026-07-09 22:58:27 +00:00
Burer requested changes 2026-07-12 09:06:57 +00:00
Dismissed
Burer left a comment
Owner

Infrastructure:

  • Functionality duplication.
    This PR adds bbench to IMG image.
    Should we move existing benchmarks from IMG to ISO and replace them with bbench in System Panel?

Blocker:

  • Closing the window mid-run leaks the temp file.
    AbortRequested() handles the window-close button (id==1) with an immediate ExitProcess(), bypassing Disk_Cleanup().
    Fix: call Disk_Cleanup() before ExitProcess() (or from an exit handler).

Minor:

  • Seq Read depends on Seq Write.
    With "Seq Write" unticked but "Seq Read" ticked, t_disk_read reads a missing bbtst.tmp → score 0 (no crash). The Random tests self-create the file via EnsureRandFile; the sequential ones don't. Give Seq Read the same guard.
  • LANG_RUS/LANG_ENG define is dead.
    Tupfile.lua passes /D=$(C_LANG) but no source references it - no localization despite the build wiring. Please, consider adding localization to all system languages.
  • Unbounded string buffers.
    disk_store slots (24 B), base[48], pf[80], disk_menu[260] are filled via strcpy/strcat from disk names with no length check. Safe for the short KolibriOS mount names, but still a risk of long name overflows.
  • Direct LFB write bypasses window clipping.
    vram_fill_gs writes the fill pattern to absolute screen coords for ~1 s; anything overlapping BirdBench's rectangle (another always-on-top window, a popup) gets painted over.
    Cosmetic, but maybe worth fixing.
**Infrastructure:** - **Functionality duplication.** This PR adds `bbench` to IMG image. Should we move existing benchmarks from IMG to ISO and replace them with `bbench` in System Panel? **Blocker:** - **Closing the window mid-run leaks the temp file.** `AbortRequested()` handles the window-close button (`id==1`) with an immediate `ExitProcess()`, bypassing `Disk_Cleanup()`. Fix: call `Disk_Cleanup()` before `ExitProcess()` (or from an exit handler). **Minor:** - **Seq Read depends on Seq Write.** With "Seq Write" unticked but "Seq Read" ticked, `t_disk_read` reads a missing `bbtst.tmp` → score 0 (no crash). The Random tests self-create the file via `EnsureRandFile`; the sequential ones don't. Give Seq Read the same guard. - **`LANG_RUS`/`LANG_ENG` define is dead.** `Tupfile.lua` passes `/D=$(C_LANG)` but no source references it - no localization despite the build wiring. Please, consider adding localization to all system languages. - **Unbounded string buffers.** `disk_store` slots (24 B), `base[48]`, `pf[80]`, `disk_menu[260]` are filled via `strcpy`/`strcat` from disk names with no length check. Safe for the short KolibriOS mount names, but still a risk of long name overflows. - **Direct LFB write bypasses window clipping.** `vram_fill_gs` writes the fill pattern to absolute screen coords for ~1 s; anything overlapping BirdBench's rectangle (another always-on-top window, a popup) gets painted over. Cosmetic, but maybe worth fixing.
Author
Owner

Functionality duplication.
This PR adds bbench to IMG image.
Should we move existing benchmarks from IMG to ISO and replace them with bbench in System Panel?

You decide. Not in the scope of current push.
I would leave them.

Direct LFB write bypasses window clipping.
vram_fill_gs writes the fill pattern to absolute screen coords for ~1 s; anything overlapping BirdBench's rectangle (another always-on-top window, a popup) gets painted over.
Cosmetic, but maybe worth fixing.

This is fine.

> Functionality duplication. > This PR adds bbench to IMG image. > Should we move existing benchmarks from IMG to ISO and replace them with bbench in System Panel? You decide. Not in the scope of current push. I would leave them. > Direct LFB write bypasses window clipping. > vram_fill_gs writes the fill pattern to absolute screen coords for ~1 s; anything overlapping BirdBench's rectangle (another always-on-top window, a popup) gets painted over. > Cosmetic, but maybe worth fixing. This is fine.
Author
Owner

@Burer other are fixed

@Burer other are fixed
Leency requested review from Burer 2026-07-12 10:26:44 +00:00
Burer changed title from bbench - Bird Benchmark for KolibriOS. Benches CPU and Memory, Graphics and Disk to WIP: apps/bbench - CPU, graphics, memory and disk benchmark for KolibriOS 2026-07-13 10:13:36 +00:00
Burer self-assigned this 2026-07-13 10:13:42 +00:00
Burer marked the pull request as ready for review 2026-07-19 14:00:25 +00:00
Burer approved these changes 2026-07-23 13:44:12 +00:00
Burer added 8 commits 2026-07-23 13:44:25 +00:00
A test that cannot run on this machine returned 0, which the section geomean
clamped to 1 and treated as the worst possible result: VRAM Write on a
banked-VGA mode, or a driver without folder ops, pulled a six-test section from
1000 down to about 300. Those now return BB_SKIP, carry no score, stay out of
the mean and appear as "skipped" in the report.

The REF_ values are guesses, and calibrating meant transcribing every metric by
hand, so nobody would. The report now ends with a ready-to-paste block holding
this machine's #define REF_ lines and its cpudb_add line. Scores only mean
something within one set of REF_ values, so BB_REVISION stamps the report and
cpudb entries from another revision are dropped instead of silently compared.

Also: bound the report buffer before writing to it, check the work-buffer
allocations, trim the VRAM row to whole dwords so the fill does not drift by a
byte per row at 24/16 bpp, and fold CompareRow's copy of the bar drawing into
Hbar.
The block is only useful while the scale is being set, and the REF_ names it
printed cost ~400 bytes of literals in every build. C-- has no macros with
arguments, so those could not be hidden behind the ifdef without one around
each of the seventeen registrations - drop the names and label the values with
the test name instead, which lands in the same order as the defines.

BB_REVISION stays unconditional: it is the version of the tests and their REF_
values, and a report that does not carry it cannot be compared with anything.
The CPU compare rows used name(22)+score(8)+mhz(11) against the test rows'
17+8+16. The totals matched, so the bars agreed, but the score and the third
column sat five characters apart. Three shared defines instead, wide enough
for the longest name in cpudb and the longest unit string.
BirdBench covers what mgb and fspeed measure, so keeping all three on a 1.44 MB
floppy buys nothing. They move to kolibrios/utils on the ISO and lose their
panel entries; the panel gains one Benchmark entry pointing at bbench, which
stays in the image. Icon 121 is the one mgb used - 48 already belongs to GrafX2.

All three syspanel.ini end up smaller than before, so none of them crosses into
a third 512-byte cluster. ru_RU is CP866 and es_ES is LF-only; both were edited
byte-wise to keep that.
bbench: probe partitions /1../9 - the writable one is NOT always #1
Test PR / Build (ru_RU) (pull_request) Successful in 1m56s
Test PR / Build (es_ES) (pull_request) Successful in 2m1s
Test PR / Build (en_US) (pull_request) Successful in 2m6s
1175b4c906
Burer force-pushed bbench-upload from 13cc3fdd94 to 1175b4c906 2026-07-23 13:44:25 +00:00 Compare
Burer merged commit 7c4d3f57e6 into main 2026-07-23 13:51:19 +00:00
Burer deleted branch bbench-upload 2026-07-23 13:51:19 +00:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KolibriOS/kolibrios#561