performance / overview

performance / overview

Performance: benchmarks, where the time goes

v0.12.0 · overview · 6 sections · docs/BENCHMARKS.md

Everything hot in wr is measured locally and deterministically: the network is a loopback httptest server, the fixtures are synthetic articles and documents, animations are off, no wall-clock or external dependency. Run it with the Go tooling you already have:

go test -run '^$' -bench . -benchmem        # the whole suite
go test -run '^$' -bench Render -benchmem   # one area
sh scripts/bench.sh                         # everything + profiles into bench-out/

The profiles answer “where does it get stuck”:

go tool pprof -top -nodecount=20 bench-out/wr.test bench-out/cpu.prof
go tool pprof -top -sample_index=alloc_space bench-out/wr.test bench-out/mem.prof

The numbers below are the current baseline: scripts/bench.sh baseline (count=3, medianas) on a Ryzen 5 3600 (6c/12t), Go 1.27.2, Linux, ext4. They are a comparison line, not a promise: rerun on your machine before and after any change, and read “The workflow” at the end about what counts as a regression on a shared machine.

Contents

edit this page on GitHub ↗report a problem ↗