Artifact 7fbc715b5725b0e5403842670162d6c12f4353ed3f235e96c4ca79dfad57ae9a:
- File
src/bench.h
— part of check-in
[6d70dcc76a]
at
2026-11-12 19:36:41
on branch trunk
— Phase 1: the config parser, the no-change run and the speed bench
suit check parses suit.conf strictly and prints a canonical dump. Any unknown kind or key, duplicate, cycle or dangling name rejects the whole file with its line number.
suit run compares a stamp against the files it names and exits without writing, allocating or printing when nothing changed.
suit bench times suit run against an empty program built the same way and against /usr/bin/true, interleaved, and fails the build when the no-change run costs more than 1 ms over the empty program or 1 MiB more memory. It measured 0.65 to 0.94 ms over, quiet and under load. A system binary starts 0.6 to 1.5 ms faster than any built binary on macOS, so it is shown for information and is not the baseline.
94 unit checks, 100 shell cases and a libFuzzer target for the parser. (user: dmestas, size: 268) [annotate] [blame] [check-ins using]
#ifndef SUIT_BENCH_H #define SUIT_BENCH_H // `suit bench [-n N]`: ARGV holds the words after "bench". Returns 0 when // the no-change run is within budget, 1 when it is not or cannot be // measured, 2 for bad arguments. int bench_main(int argc, char **argv); #endif