mix ascii.perf (Ascii v0.3.0)

Copy Markdown View Source

Plays each piece as upstream's scripts/check.ts times it, a fresh instance stepped every 1/fps seconds from 0 to 6, and prints the average and worst time a frame took (the first frame aside), against upstream's budgets: text pieces 4 ms on average and 30 ms at worst, scenes 10 ms on average and 40 ms at worst.

mix ascii.perf                # every piece
mix ascii.perf donut night-coast

A piece more than three times over its average budget is marked SLOW; mix test --only perf fails on those.

Summary

Functions

Times a piece: %{slug, category, avg, max, init, budget, worst} in ms.

Functions

measure(slug, mod)

@spec measure(slug :: String.t(), module :: module()) :: map()

Times a piece: %{slug, category, avg, max, init, budget, worst} in ms.