Documentation ¶
Index ¶
- func SetFlagsForDriver(f *flag.FlagSet) map[Type]*DriverConfig
- type Config
- type ConfigSet
- func (c *ConfigSet) Clear(typ Type)
- func (c ConfigSet) Copy() ConfigSet
- func (c ConfigSet) Empty() bool
- func (c ConfigSet) Get(typ Type) (Config, bool)
- func (c *ConfigSet) Set(d Config)
- func (c ConfigSet) Strings() []string
- func (c ConfigSet) ToSlice() []Config
- func (c *ConfigSet) UnmarshalTOML(data interface{}) error
- type DriverConfig
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetFlagsForDriver ¶
func SetFlagsForDriver(f *flag.FlagSet) map[Type]*DriverConfig
Types ¶
type Config ¶
type Config struct { // Type is the diagnostic to collect data for. Type // Flags is additional opaque configuration for data collection. // // Currently only used if Type == Perf. Flags string }
Config is an intent to collect data for some diagnostic with some room for additional configuration as to how that data is collected.
func ParseConfig ¶
ParseConfig derives a Config from a string. The string must take the form
<type>[=<flags>]
where [=<flags>] is only accepted if <type> is perf.
func (Config) DriverArgs ¶
DriverArgs returns the arguments that should be passed to a Sweet benchmark binary to collect data for the Config.
type ConfigSet ¶
type ConfigSet struct {
// contains filtered or unexported fields
}
ConfigSet is an immutable set of Config, containing at most one Config of each supported type.
func (*ConfigSet) Clear ¶
Clear removes the Config with the provided Type from the ConfigSet, if applicable.
func (ConfigSet) Get ¶
Get looks up the Config with the provided Type and returns it if it exists with the second result indicating presence.
func (ConfigSet) Strings ¶
Strings returns the set of ConfigSet as strings by calling the String method on each Config.
func (*ConfigSet) UnmarshalTOML ¶
UnmarshalTOML implements TOML unmarshaling for ConfigSet.