Repository navigation
0.4.7: the processor's model; a capture taken in parts and not made durable - #27
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
machine::processor_model()answers the processor's model as the system names it:model nameof/proc/cpuinfoon Linux, or the implementer and part (0x41:0xd0c) where the kernel names no model (most aarch64 and riscv64 processors);machdep.cpu.brand_stringon macOS; the registry'sProcessorNameStringon 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 sincebeginor the lasttakewhile the stream stays diverted, so a test framework keeps one capture per program and takes each case's part from it.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,044fsynccalls 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.mcpp teston x86_64-linux-gnu, 13 programs, 20 cases passed.