cockroach: Index | Files

package opbench

import ""


Package Files

cat.go config.go spec.go

func MakeTPCHCatalog Uses

func MakeTPCHCatalog() *testcat.Catalog

MakeTPCHCatalog returns a test catalog loaded with the TPCH schema and statistics.

type ConfigIterator Uses

type ConfigIterator struct {
    // contains filtered or unexported fields

ConfigIterator takes a list of Options and produces every possible combination of them. TODO(justin): we should also support some kind of consistent sampling of these so we don't necessarily have to run them all.

func NewConfigIterator Uses

func NewConfigIterator(spec *Spec) *ConfigIterator

NewConfigIterator returns a ConfigIterator that iterates over all of the possible inputs to the given Spec.

func (*ConfigIterator) Next Uses

func (it *ConfigIterator) Next() (Configuration, bool)

Next returns the next Configuration in the iteration process.

type Configuration Uses

type Configuration map[string]float64

Configuration is a particular set of inputs. A Configuration totally defines how the parameters for a given plan should be set.

func (Configuration) String Uses

func (c Configuration) String() string

type Options Uses

type Options struct {
    Field  string
    Values []float64

Options denotes a single input to a plan, along with the set of legal values for that input.

type Spec Uses

type Spec struct {
    // Name is the title of spec. It is what determines the filename of
    // this spec's results.
    Name string

    // Plan is the parameterized exprgen Plan, with each parameter prefixed with
    // a $.
    Plan string

    // Inputs is the set of possible inputs, along with a set of potential values
    // for each. This allows enumerating all combinations.
    Inputs []Options

    // GetParam maps the name of a parameter to its value, given
    // the configuration.
    GetParam func(string, Configuration) string

Spec defines a single parameterized Plan which we would like to benchmark. A Spec has "parameters", which are values that get substituted into the Plan, and "inputs", which are the values from which the parameters are derived. These might differ in cases like where a Spec must scan tables of different widths, and the "input" is the width of the table, and the "parameter" is the name of the table that is scanned.

func (*Spec) FillInParams Uses

func (s *Spec) FillInParams(c Configuration) string

FillInParams returns the Spec's Plan with parameters filled in with respect to the given configuration.

func (*Spec) InputNames Uses

func (s *Spec) InputNames() []string

InputNames returns a slice of the names of the inputs to the spec.

Package opbench imports 6 packages (graph). Updated 2020-09-23. Refresh now. Tools for package owners.