Skip to content

0.4.7: the processor's model; a capture taken in parts and not made durable - #27

Merged
Sunrisepeak merged 2 commits into
mainfrom
feat/processor-model
Nov 20, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
feat/processor-model

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • machine::processor_model() answers the processor's model as the system names it: model name of /proc/cpuinfo on Linux, or the implementer and part (0x41:0xd0c) where the kernel names no model (most aarch64 and riscv64 processors); machdep.cpu.brand_string on macOS; the registry's ProcessorNameString on Windows. An image and a wasm module are told nothing. Hosted runners of one label are several processors that differ in speed by up to 1.6 times; a measurement compared across machines is compared by this name.
  • stdio::capture::take() gives what was written since begin or the last take while the stream stays diverted, so a test framework keeps one capture per program and takes each case's part from it.
  • A capture no longer flushes openkal's stream at its begin and end. openkal buffers nothing, and its flush of a file is fsync: two per case made a 510-case program take 1.05 s instead of 0.03 s under a runner that keeps each case's output (4,044 fsync calls measured).

Both serve the mcpp test and CI design (mcpp-community/mcpp, .agents/docs/2026-11-20-test-architecture-upgrade-design.md, 5.9 and 5.12).

Test

  • platform_test: every system this library defines names its processor without surrounding spaces; an image is not told it.
  • process_test: a capture is taken in two parts, with what a started program wrote, then put back.
  • Local: mcpp test on x86_64-linux-gnu, 13 programs, 20 cases passed.

The model as the system names it: /proc/cpuinfo's model name on Linux, or
the implementer and part where the kernel names no model; macOS's
machdep.cpu.brand_string; the registry's ProcessorNameString on Windows. An
image and a wasm module are told nothing. Hosted runners of one class
differ in speed by up to 1.6 times, and a measurement compared across them
is compared by this name (mcpp-community/mcpp test and CI design 5.9).
…rable

openkal buffers nothing, and its flush of a file is fsync: the two flushes
a capture made at its begin and its end made a 510-case program take one
second instead of three hundredths under a runner that keeps each case's
output. take() gives what was written since begin or the last take while
the stream stays diverted, so a framework keeps one capture per program.
@Sunrisepeak Sunrisepeak changed the title 0.4.7: the processor's model (machine::processor_model) 0.4.7: the processor's model; a capture taken in parts and not made durable Nov 20, 2026
@Sunrisepeak
Sunrisepeak merged commit 0322c39 into main Nov 20, 2026
23 checks passed
@Sunrisepeak
Sunrisepeak deleted the feat/processor-model branch November 20, 2026 15:53
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