Skip to content

stdlib-complexity growth checks use wall-clock time: on a loaded machine a linear op fails its 6× bound (trie 6.4× at load 36) #1998

Closed

Description

@ehartford

Battery on stack #1992 (wave-eval 77db69f) went red on stdlib-complexity: trie n=2000 small_ns=3843709 large_ns=24608292 within_bound=false — 6.4× for 4× n against a bound of 6×+1 ms, at load average 36 (two batteries and six agents building). Every other non-XFAIL row passed. test/complexity/stdlib.w measures elapsed() wall time (median of 3), so CPU contention reads as super-linear growth: a flaky red that blocks a battery for reasons unrelated to the change. Fix the measurement, not the bound: time the work with per-thread/process CPU time (rusage user+sys, or clock_gettime(CLOCK_THREAD_CPUTIME_ID) through the existing libc seams) so other processes don't count, and keep the 6× bound. Show: the row at load ~36 (run the target while a :dev builds elsewhere) passes after, and a deliberately quadratic probe still fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions