Documentation ¶
Overview ¶
Package benchstatter is used to run benchstatter programmatically
Index ¶
- func AddCollectionFiles(c *benchstat.Collection, files ...string) error
- func FormatMarkdown(w io.Writer, tables []*benchstat.Table, opts *MarkdownFormatterOptions) error
- type Benchstat
- type CSVFormatterOptions
- type HTMLFormatterOptions
- type MarkdownFormatterOptions
- type OutputFormatter
- type TextFormatterOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCollectionFiles ¶
func AddCollectionFiles(c *benchstat.Collection, files ...string) error
AddCollectionFiles adds files to a collection
func FormatMarkdown ¶ added in v0.5.2
FormatMarkdown formats benchstat output as markdown
Types ¶
type Benchstat ¶
type Benchstat struct { // DeltaTest is the test to use to decide if a change is significant. // If nil, it defaults to UTest. DeltaTest benchstat.DeltaTest // Alpha is the p-value cutoff to report a change as significant. // If zero, it defaults to 0.05. Alpha float64 // AddGeoMean specifies whether to add a line to the table // showing the geometric mean of all the benchmark results. AddGeoMean bool // SplitBy specifies the labels to split results by. // By default, results will only be split by full name. SplitBy []string // Order specifies the row display order for this table. // If Order is nil, the table rows are printed in order of // first appearance in the input. Order benchstat.Order // ReverseOrder reverses the display order. Not valid if Order is nil. ReverseOrder bool // OutputFormatter determines how the output will be formatted. Default is TextFormatter OutputFormatter OutputFormatter }
Benchstat is a benchstat runner
func (*Benchstat) Collection ¶
func (b *Benchstat) Collection() *benchstat.Collection
Collection returns a *benchstat.Collection
func (*Benchstat) OutputTables ¶
OutputTables outputs the results from tables using b.OutputFormatter
type CSVFormatterOptions ¶
type CSVFormatterOptions struct {
NoRange bool
}
CSVFormatterOptions options for a csv OutputFormatter
type HTMLFormatterOptions ¶
type HTMLFormatterOptions struct { Header string }
HTMLFormatterOptions options for an html OutputFormatter
type MarkdownFormatterOptions ¶ added in v0.4.0
type MarkdownFormatterOptions struct {
CSVFormatterOptions
}
MarkdownFormatterOptions options for a markdown OutputFormatter
type OutputFormatter ¶
OutputFormatter formats benchstat output
func CSVFormatter ¶
func CSVFormatter(opts *CSVFormatterOptions) OutputFormatter
CSVFormatter returns a csv OutputFormatter
func HTMLFormatter ¶
func HTMLFormatter(opts *HTMLFormatterOptions) OutputFormatter
HTMLFormatter return an html OutputFormatter
func MarkdownFormatter ¶ added in v0.4.0
func MarkdownFormatter(opts *MarkdownFormatterOptions) OutputFormatter
MarkdownFormatter return a markdown OutputFormatter
func TextFormatter ¶
func TextFormatter(_ *TextFormatterOptions) OutputFormatter
TextFormatter returns a text OutputFormatter
type TextFormatterOptions ¶
type TextFormatterOptions struct{}
TextFormatterOptions options for a text OutputFormatter