Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TaskName is the name of the task this file implements TaskName string = "metrics/collect" // DefaultQPS is the default value of QPS (queries per sec) in collect task inputs DefaultQPS float32 = 8 // DefaultTime is the default value of time (duration of queries) in collect task inputs DefaultTime string = "5s" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CollectInputs ¶
type CollectInputs struct { // how long to run the metrics collector; optional; default 5s Time *string `json:"time,omitempty" yaml:"time,omitempty"` // list of versions Versions []Version `json:"versions" yaml:"versions"` // URL of the JSON file to send during the query; optional PayloadURL *string `json:"payloadURL,omitempty" yaml:"payloadURL,omitempty"` // if LoadOnly is set to true, this task will send requests without collecting metrics; optional LoadOnly *bool `json:"loadOnly,omitempty" yaml:"loadOnly,omitempty"` }
CollectInputs contain the inputs to the metrics collection task to be executed.
type CollectTask ¶
type CollectTask struct { core.TaskMeta With CollectInputs `json:"with" yaml:"with"` }
CollectTask enables collection of Iter8's built-in metrics.
func (*CollectTask) InitializeDefaults ¶
func (t *CollectTask) InitializeDefaults()
InitializeDefaults sets default values for time duration and QPS for Fortio run Default values are set only if the field is non-empty
type DurationHist ¶
type DurationHist struct { Count int Max float64 Sum float64 Data []DurationSample }
DurationHist is the Fortio duration histogram
type DurationSample ¶
DurationSample is a Fortio duration sample
type Result ¶
type Result struct { DurationHistogram DurationHist RetCodes map[string]int }
Result is the result of a single Fortio run; it contains the result for a single version
type Version ¶
type Version struct { // name of the version // version names must be unique and must match one of the version names in the // VersionInfo field of the experiment Name string `json:"name" yaml:"name"` // how many queries per second will be sent to this version; optional; default 8 QPS *float32 `json:"qps,omitempty" yaml:"qps,omitempty"` // HTTP headers to use in the query for this version; optional Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"` // URL to use for querying this version URL string `json:"url" yaml:"url"` }
Version contains header and url information needed to send requests to each version.
Click to show internal directories.
Click to hide internal directories.