# `mix ascii.perf`
[🔗](https://github.com/houllette/ascii_art/blob/main/lib/mix/tasks/ascii.perf.ex#L1)

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.

# `measure`

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

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
