Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBenchmarks ¶
func RegisterBenchmark ¶
func RegisterBenchmark(benchmark Benchmark)
Types ¶
type BenchDirConfig ¶
BenchDirConfig controls the directory where the benchmark data will be generated.
type Benchmark ¶
type Benchmark interface { // Name should return the name of the benchmark. It will also be used to match against cli args. Name() string // Setup sets up the benchmark state, this is not timed. Setup(ctx context.Context, benchmarkDir string) error // Run performs the actual benchmark, this is timed. Run(ctx context.Context) (*reporter.BenchmarkRun, error) // TearDown clear the benchmark state, this is not timed. TearDown(ctx context.Context) error }
type FixedBenchDirConfig ¶
type FixedBenchDirConfig struct {
// contains filtered or unexported fields
}
FixedBenchDirConfig always returns a known path.
func NewFixedBenchDirConfig ¶
func NewFixedBenchDirConfig(path string) *FixedBenchDirConfig
func (*FixedBenchDirConfig) Get ¶
func (p *FixedBenchDirConfig) Get() (string, error)
type TmpBenchDirConfig ¶
type TmpBenchDirConfig struct {
// contains filtered or unexported fields
}
TmpBenchDirConfig returns a temporary path that is generated on first use.
func (*TmpBenchDirConfig) Get ¶
func (t *TmpBenchDirConfig) Get() (string, error)
Click to show internal directories.
Click to hide internal directories.