Versions in this module Expand all Collapse all v0 v0.27.1 Jul 30, 2020 Changes in this version + const DataTypeAggregatedHTTPReqs + const DataTypeMap + const DataTypeSingle + const MaxRetries + const RequestTimeout + const RetryInterval + const TestName + var ErrNotAuthenticated = errors.New("Failed to authenticate with Load Impact cloud") + var ErrNotAuthorized = errors.New("Not allowed to upload result to Load Impact cloud") + var ErrUnknown = errors.New("An error occurred talking to Load Impact cloud") + func MergeFromExternal(external map[string]json.RawMessage, conf *Config) error + func URLForResults(refID string, config Config) string + type AggregatedMetric struct + Avg float64 + Max float64 + Min float64 + func (am *AggregatedMetric) Add(t time.Duration) + func (am *AggregatedMetric) Calc(count float64) + type Client struct + func NewClient(token, host, version string) *Client + func (c *Client) CreateTestRun(testRun *TestRun) (*CreateTestRunResponse, error) + func (c *Client) Do(req *http.Request, v interface{}) error + func (c *Client) GetTestProgress(referenceID string) (*TestProgressResponse, error) + func (c *Client) Login(email string, password string) (*LoginResponse, error) + func (c *Client) NewRequest(method, url string, data interface{}) (*http.Request, error) + func (c *Client) PushMetric(referenceID string, noCompress bool, samples []*Sample) error + func (c *Client) StartCloudTestRun(name string, projectID int64, arc *lib.Archive) (string, error) + func (c *Client) StopCloudTestRun(referenceID string) error + func (c *Client) TestFinished(referenceID string, thresholds ThresholdResult, tained bool, ...) error + func (c *Client) ValidateOptions(options lib.Options) error + type Collector struct + func New(conf Config, src *loader.SourceData, opts lib.Options, ...) (*Collector, error) + func (c *Collector) Collect(sampleContainers []stats.SampleContainer) + func (c *Collector) GetRequiredSystemTags() stats.SystemTagSet + func (c *Collector) Init() error + func (c *Collector) Link() string + func (c *Collector) Run(ctx context.Context) + func (c *Collector) SetRunStatus(status lib.RunStatus) + type Config struct + AggregationCalcInterval types.NullDuration + AggregationMinSamples null.Int + AggregationOutlierAlgoThreshold null.Int + AggregationOutlierIqrCoefLower null.Float + AggregationOutlierIqrCoefUpper null.Float + AggregationOutlierIqrRadius null.Float + AggregationPeriod types.NullDuration + AggregationSkipOutlierDetection null.Bool + AggregationWaitPeriod types.NullDuration + DeprecatedToken null.String + Host null.String + MaxMetricSamplesPerPackage null.Int + MetricPushConcurrency null.Int + MetricPushInterval types.NullDuration + Name null.String + NoCompress null.Bool + ProjectID null.Int + PushRefID null.String + Token null.String + WebAppURL null.String + func NewConfig() Config + func (c Config) Apply(cfg Config) Config + type CreateTestRunResponse struct + ConfigOverride *Config + ReferenceID string + type ErrorResponse struct + Code int + Details map[string][]string + Errors []string + FieldErrors map[string][]string + Message string + Response *http.Response + func (e ErrorResponse) Error() string + type LoginResponse struct + Token string + type ResultStatus int + const ResultStatusFailed + const ResultStatusPassed + type Sample struct + Data interface{} + Metric string + Type string + func NewSampleFromTrail(trail *httpext.Trail) *Sample + func (ct *Sample) UnmarshalJSON(p []byte) error + type SampleDataAggregatedHTTPReqs struct + Count uint64 + Tags *stats.SampleTags + Time Timestamp + Type string + Values struct{ ... } + func (sdagg *SampleDataAggregatedHTTPReqs) Add(trail *httpext.Trail) + func (sdagg *SampleDataAggregatedHTTPReqs) CalcAverages() + type SampleDataMap struct + Tags *stats.SampleTags + Time Timestamp + Type stats.MetricType + Values map[string]float64 + type SampleDataSingle struct + Tags *stats.SampleTags + Time Timestamp + Type stats.MetricType + Value float64 + type TestProgressResponse struct + Progress float64 + ResultStatus ResultStatus + RunStatus lib.RunStatus + RunStatusText string + type TestRun struct + Duration int64 + Name string + ProjectID int64 + Thresholds map[string][]string + VUsMax int64 + type ThresholdResult map[string]map[string]bool + type Timestamp time.Time + func (ct *Timestamp) UnmarshalJSON(p []byte) error + func (ct Timestamp) Equal(other Timestamp) bool + func (ct Timestamp) MarshalJSON() ([]byte, error)