Documentation
¶
Overview ¶
Package benchfmt renders a bench.Result as the human-readable benchmark report shared by the CLI and the playground.
Index ¶
- func Dispatch(f float64) string
- func Pair(before, after string, wb, wa int) string
- func PctLabel(b, a float64) string
- func Plural(n int, noun string) string
- func Render(w io.Writer, r *bench.Result) error
- func Summary(r *bench.Result) []string
- func Totals(r *bench.Result) []string
- func Unexercised(r *bench.Result) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PctLabel ¶
PctLabel is the signed rounded percent change, blank when the values are equal or the baseline is zero.
func Render ¶
Render prints the benchmark report: deny-check totals, then the deny checks whose cost changed (or all of them in profile mode). Allow checks stop early, so their read counts are noise and only appear in the footer.
func Summary ¶
Summary returns the benchmark header, totals and unexercised warning as lines, without the table or any leading blank line.
func Totals ¶
Totals returns the totals block lines exactly as Render prints them: deny reads and dispatches, plus the answers line unless r is a profile run.
func Unexercised ¶
Unexercised returns the unexercised warning as lines, or nil when every rewritten relation was exercised.
Types ¶
This section is empty.