Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CustomMakerRegistry *customMakerRegistry = new(customMakerRegistry)
Use CustomMakerRegistry with --maker to use a specific entity for Response.Data.
Functions ¶
func Parse ¶ added in v0.6.0
func Parse(p string, cp *CliPayload) error
Parse expects the following format: "<input name>:[<type>|]<CSV values>[;<input name>:...]". If type is not provided, then it will be string; otherwise, "int" and "float32" can be used.
func RunWithOptions ¶
Types ¶
type CliPayload ¶ added in v0.6.0
func (*CliPayload) Bind ¶ added in v0.6.0
func (c *CliPayload) Bind(k string, value interface{}, msg *client.Message) error
Bind delegates types to appropriate client.Message method.
func (*CliPayload) Pair ¶ added in v0.6.0
func (c *CliPayload) Pair(key string, value interface{}) error
func (*CliPayload) SetBatch ¶ added in v0.6.0
func (c *CliPayload) SetBatch(msg *client.Message)
type Options ¶
type Options struct { Host string `long:"host" description:"endpoint host"` Port int `short:"p" long:"port" description:"endpoint port"` Address string `long:"address" description:"address overrides host and port"` Debug bool `long:"debug"` TimeoutUs int `short:"t" long:"timeout"` Model string `short:"m" long:"model" description:"model"` Storable string `short:"s" long:"storable"` CustomMaker string `long:"maker" description:"non-storable Response.Data, requires binding with CustomMaker"` CacheMB int `long:"cache"` NoHashCheck bool `long:"nohash"` Workers int `long:"workers"` Concurrent int `long:"concurrent"` // In the case Workers > 1, Repeats is the total number of times each payload // is run, not the number of times each workers sends the paylod. Repeats int `long:"repeats" description:"times to repeat all payloads"` PayloadStr []string `short:"a" long:"payload"` PayloadPause int `long:"pause" description:"pause seconds between payloads"` PayloadDelay int `long:"delay" description:"pause seconds from first payload"` SkipError bool `long:"skiperrs"` NoOutput bool `long:"noout"` Metrics bool `long:"metrics"` ErrorHistory bool `long:"errhist"` // Report forces NoOutput and SkipError true, Metrics and ErrorHistory false. // Will generate a final JSON object as its only output to stdout. // stderr may have other output if Debug is true or there are other errors. Report bool `long:"report"` }
func (*Options) Payloads ¶ added in v0.9.0
func (o *Options) Payloads() ([]*CliPayload, error)
type RepeatSet ¶ added in v0.13.0
type RepeatSet struct { Num int WPayloads []WorkerPayload }
type WorkerPayload ¶ added in v0.13.0
type WorkerPayload struct { Payload *CliPayload Worker int Runs []WPRun }
Click to show internal directories.
Click to hide internal directories.