summary

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersion = "1.0.0"

SchemaVersion holds the schema version used to generate the code in this package.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterValues

type CounterValues struct {
	// Total count of events
	Count float64 `json:"count"`
}

func NewCounterValues

func NewCounterValues() *CounterValues

NewCounterValues creates a new CounterValues object.

func (CounterValues) Equals

func (resource CounterValues) Equals(other CounterValues) bool

Equals tests the equality of two `CounterValues` objects.

func (*CounterValues) UnmarshalJSONStrict

func (resource *CounterValues) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `CounterValues` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (CounterValues) Validate

func (resource CounterValues) Validate() error

Validate checks all the validation constraints that may be defined on `CounterValues` fields for violations and returns them.

type CounterValuesBuilder

type CounterValuesBuilder struct {
	// contains filtered or unexported fields
}

func NewCounterValuesBuilder

func NewCounterValuesBuilder() *CounterValuesBuilder

func (*CounterValuesBuilder) Build

func (builder *CounterValuesBuilder) Build() (CounterValues, error)

func (*CounterValuesBuilder) Count

func (builder *CounterValuesBuilder) Count(count float64) *CounterValuesBuilder

Total count of events

type GaugeValues

type GaugeValues struct {
	// Maximum observed value
	Max float64 `json:"max"`
	// Minimum observed value
	Min float64 `json:"min"`
	// Current/final gauge value
	Value float64 `json:"value"`
}

func NewGaugeValues

func NewGaugeValues() *GaugeValues

NewGaugeValues creates a new GaugeValues object.

func (GaugeValues) Equals

func (resource GaugeValues) Equals(other GaugeValues) bool

Equals tests the equality of two `GaugeValues` objects.

func (*GaugeValues) UnmarshalJSONStrict

func (resource *GaugeValues) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `GaugeValues` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (GaugeValues) Validate

func (resource GaugeValues) Validate() error

Validate checks all the validation constraints that may be defined on `GaugeValues` fields for violations and returns them.

type GaugeValuesBuilder

type GaugeValuesBuilder struct {
	// contains filtered or unexported fields
}

func NewGaugeValuesBuilder

func NewGaugeValuesBuilder() *GaugeValuesBuilder

func (*GaugeValuesBuilder) Build

func (builder *GaugeValuesBuilder) Build() (GaugeValues, error)

func (*GaugeValuesBuilder) Max

func (builder *GaugeValuesBuilder) Max(max float64) *GaugeValuesBuilder

Maximum observed value

func (*GaugeValuesBuilder) Min

func (builder *GaugeValuesBuilder) Min(min float64) *GaugeValuesBuilder

Minimum observed value

func (*GaugeValuesBuilder) Value

func (builder *GaugeValuesBuilder) Value(value float64) *GaugeValuesBuilder

Current/final gauge value

type Metric

type Metric struct {
	// The type of data the metric contains
	Contains MetricContains `json:"contains"`
	// The metric name
	Name string `json:"name"`
	// The metric type
	Type   MetricType `json:"type"`
	Values any        `json:"values"`
}

func NewMetric

func NewMetric() *Metric

NewMetric creates a new Metric object.

func (Metric) Equals

func (resource Metric) Equals(other Metric) bool

Equals tests the equality of two `Metric` objects.

func (*Metric) UnmarshalJSONStrict

func (resource *Metric) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Metric` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (Metric) Validate

func (resource Metric) Validate() error

Validate checks all the validation constraints that may be defined on `Metric` fields for violations and returns them.

type MetricBuilder

type MetricBuilder struct {
	// contains filtered or unexported fields
}

func NewMetricBuilder

func NewMetricBuilder() *MetricBuilder

func (*MetricBuilder) Build

func (builder *MetricBuilder) Build() (Metric, error)

func (*MetricBuilder) Contains

func (builder *MetricBuilder) Contains(contains MetricContains) *MetricBuilder

The type of data the metric contains

func (*MetricBuilder) Name

func (builder *MetricBuilder) Name(name string) *MetricBuilder

The metric name

func (*MetricBuilder) Type

func (builder *MetricBuilder) Type(typeArg MetricType) *MetricBuilder

The metric type

func (*MetricBuilder) Values

func (builder *MetricBuilder) Values(values any) *MetricBuilder

type MetricContains

type MetricContains string

Modified by compiler pass 'AnonymousEnumToExplicitType' Modified by compiler pass 'PrefixEnumValues'

const (
	MetricContainsDefault MetricContains = "default"
	MetricContainsTime    MetricContains = "time"
	MetricContainsData    MetricContains = "data"
)

type MetricType

type MetricType string

Modified by compiler pass 'AnonymousEnumToExplicitType' Modified by compiler pass 'PrefixEnumValues'

const (
	MetricTypeCounter MetricType = "counter"
	MetricTypeGauge   MetricType = "gauge"
	MetricTypeRate    MetricType = "rate"
	MetricTypeTrend   MetricType = "trend"
)

type RateValues

type RateValues struct {
	// Number of 'true' events, i.e. occurrences of the event reflected by the metric
	Matches int64 `json:"matches"`
	// Proportion of true events, calculated true / total (value between 0 and 1)
	Rate float64 `json:"rate"`
	// Total number of events (true and non-true)
	Total int64 `json:"total"`
}

func NewRateValues

func NewRateValues() *RateValues

NewRateValues creates a new RateValues object.

func (RateValues) Equals

func (resource RateValues) Equals(other RateValues) bool

Equals tests the equality of two `RateValues` objects.

func (*RateValues) UnmarshalJSONStrict

func (resource *RateValues) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `RateValues` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (RateValues) Validate

func (resource RateValues) Validate() error

Validate checks all the validation constraints that may be defined on `RateValues` fields for violations and returns them.

type RateValuesBuilder

type RateValuesBuilder struct {
	// contains filtered or unexported fields
}

func NewRateValuesBuilder

func NewRateValuesBuilder() *RateValuesBuilder

func (*RateValuesBuilder) Build

func (builder *RateValuesBuilder) Build() (RateValues, error)

func (*RateValuesBuilder) Matches

func (builder *RateValuesBuilder) Matches(matches int64) *RateValuesBuilder

Number of 'true' events, i.e. occurrences of the event reflected by the metric

func (*RateValuesBuilder) Rate

func (builder *RateValuesBuilder) Rate(rate float64) *RateValuesBuilder

Proportion of true events, calculated true / total (value between 0 and 1)

func (*RateValuesBuilder) Total

func (builder *RateValuesBuilder) Total(total int64) *RateValuesBuilder

Total number of events (true and non-true)

type SemVer

type SemVer string

type Summary

type Summary struct {
	// Configuration information about the test execution
	Config SummarySummaryConfig `json:"config"`
	// Metadata about the summary generation
	Metadata SummarySummaryMetadata `json:"metadata"`
	// Test execution results data
	Results SummarySummaryResults `json:"results"`
	// Schema version in semver 2.0 format (e.g., '1.0.0')
	Version SemVer `json:"version"`
}

func NewSummary

func NewSummary() *Summary

NewSummary creates a new Summary object.

func (Summary) Equals

func (resource Summary) Equals(other Summary) bool

Equals tests the equality of two `Summary` objects.

func (*Summary) UnmarshalJSONStrict

func (resource *Summary) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `Summary` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (Summary) Validate

func (resource Summary) Validate() error

Validate checks all the validation constraints that may be defined on `Summary` fields for violations and returns them.

type SummaryBuilder

type SummaryBuilder struct {
	// contains filtered or unexported fields
}

func NewSummaryBuilder

func NewSummaryBuilder() *SummaryBuilder

func (*SummaryBuilder) Build

func (builder *SummaryBuilder) Build() (Summary, error)

func (*SummaryBuilder) Config

func (builder *SummaryBuilder) Config(config cog.Builder[SummarySummaryConfig]) *SummaryBuilder

Configuration information about the test execution

func (*SummaryBuilder) Metadata

func (builder *SummaryBuilder) Metadata(metadata cog.Builder[SummarySummaryMetadata]) *SummaryBuilder

Metadata about the summary generation

func (*SummaryBuilder) Results

func (builder *SummaryBuilder) Results(results cog.Builder[SummarySummaryResults]) *SummaryBuilder

Test execution results data

func (*SummaryBuilder) Version

func (builder *SummaryBuilder) Version(version SemVer) *SummaryBuilder

Schema version in semver 2.0 format (e.g., '1.0.0')

type SummarySummaryConfig

type SummarySummaryConfig struct {
	// Test run duration in seconds
	Duration float64 `json:"duration"`
	// Type of execution (local or cloud)
	Execution SummarySummaryConfigExecution `json:"execution"`
	// Path or name of the test script
	// Modified by compiler pass 'NotRequiredFieldAsNullableType[nullable=true]'
	Script *string `json:"script,omitempty"`
}

Modified by compiler pass 'AnonymousStructsToNamed'

func NewSummarySummaryConfig

func NewSummarySummaryConfig() *SummarySummaryConfig

NewSummarySummaryConfig creates a new SummarySummaryConfig object.

func (SummarySummaryConfig) Equals

func (resource SummarySummaryConfig) Equals(other SummarySummaryConfig) bool

Equals tests the equality of two `SummarySummaryConfig` objects.

func (*SummarySummaryConfig) UnmarshalJSONStrict

func (resource *SummarySummaryConfig) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `SummarySummaryConfig` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (SummarySummaryConfig) Validate

func (resource SummarySummaryConfig) Validate() error

Validate checks all the validation constraints that may be defined on `SummarySummaryConfig` fields for violations and returns them.

type SummarySummaryConfigBuilder

type SummarySummaryConfigBuilder struct {
	// contains filtered or unexported fields
}

func NewSummarySummaryConfigBuilder

func NewSummarySummaryConfigBuilder() *SummarySummaryConfigBuilder

func (*SummarySummaryConfigBuilder) Build

func (*SummarySummaryConfigBuilder) Duration

Test run duration in seconds

func (*SummarySummaryConfigBuilder) Execution

Type of execution (local or cloud)

func (*SummarySummaryConfigBuilder) Script

Path or name of the test script

type SummarySummaryConfigExecution

type SummarySummaryConfigExecution string

Modified by compiler pass 'AnonymousEnumToExplicitType' Modified by compiler pass 'PrefixEnumValues'

const (
	SummarySummaryConfigExecutionLocal SummarySummaryConfigExecution = "local"
	SummarySummaryConfigExecutionCloud SummarySummaryConfigExecution = "cloud"
)

type SummarySummaryMetadata

type SummarySummaryMetadata struct {
	// RFC3339 timestamp when summary was generated
	GeneratedAt time.Time `json:"generatedAt"`
	// Version of k6 that generated this summary
	K6Version SemVer `json:"k6Version"`
}

Modified by compiler pass 'AnonymousStructsToNamed'

func NewSummarySummaryMetadata

func NewSummarySummaryMetadata() *SummarySummaryMetadata

NewSummarySummaryMetadata creates a new SummarySummaryMetadata object.

func (SummarySummaryMetadata) Equals

func (resource SummarySummaryMetadata) Equals(other SummarySummaryMetadata) bool

Equals tests the equality of two `SummarySummaryMetadata` objects.

func (*SummarySummaryMetadata) UnmarshalJSONStrict

func (resource *SummarySummaryMetadata) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `SummarySummaryMetadata` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (SummarySummaryMetadata) Validate

func (resource SummarySummaryMetadata) Validate() error

Validate checks all the validation constraints that may be defined on `SummarySummaryMetadata` fields for violations and returns them.

type SummarySummaryMetadataBuilder

type SummarySummaryMetadataBuilder struct {
	// contains filtered or unexported fields
}

func NewSummarySummaryMetadataBuilder

func NewSummarySummaryMetadataBuilder() *SummarySummaryMetadataBuilder

func (*SummarySummaryMetadataBuilder) Build

func (*SummarySummaryMetadataBuilder) GeneratedAt

func (builder *SummarySummaryMetadataBuilder) GeneratedAt(generatedAt time.Time) *SummarySummaryMetadataBuilder

RFC3339 timestamp when summary was generated

func (*SummarySummaryMetadataBuilder) K6Version

Version of k6 that generated this summary

type SummarySummaryResults

type SummarySummaryResults struct {
	// Check execution results
	// Modified by compiler pass 'NotRequiredFieldAsNullableType[nullable=true]'
	Checks *SummarySummaryResultsChecks `json:"checks,omitempty"`
	// Array of all metrics from the test execution
	Metrics []Metric `json:"metrics"`
}

Modified by compiler pass 'AnonymousStructsToNamed'

func NewSummarySummaryResults

func NewSummarySummaryResults() *SummarySummaryResults

NewSummarySummaryResults creates a new SummarySummaryResults object.

func (SummarySummaryResults) Equals

func (resource SummarySummaryResults) Equals(other SummarySummaryResults) bool

Equals tests the equality of two `SummarySummaryResults` objects.

func (*SummarySummaryResults) UnmarshalJSONStrict

func (resource *SummarySummaryResults) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `SummarySummaryResults` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (SummarySummaryResults) Validate

func (resource SummarySummaryResults) Validate() error

Validate checks all the validation constraints that may be defined on `SummarySummaryResults` fields for violations and returns them.

type SummarySummaryResultsBuilder

type SummarySummaryResultsBuilder struct {
	// contains filtered or unexported fields
}

func NewSummarySummaryResultsBuilder

func NewSummarySummaryResultsBuilder() *SummarySummaryResultsBuilder

func (*SummarySummaryResultsBuilder) Build

func (*SummarySummaryResultsBuilder) Checks

Check execution results

func (*SummarySummaryResultsBuilder) Metrics

Array of all metrics from the test execution

type SummarySummaryResultsChecks

type SummarySummaryResultsChecks struct {
	// Array of check-related metrics
	// Modified by compiler pass 'NotRequiredFieldAsNullableType[nullable=true]'
	Metrics []Metric `json:"metrics,omitempty"`
	// Individual check results in execution order
	// Modified by compiler pass 'NotRequiredFieldAsNullableType[nullable=true]'
	Results []SummarySummaryResultsChecksResults `json:"results,omitempty"`
}

Modified by compiler pass 'AnonymousStructsToNamed'

func NewSummarySummaryResultsChecks

func NewSummarySummaryResultsChecks() *SummarySummaryResultsChecks

NewSummarySummaryResultsChecks creates a new SummarySummaryResultsChecks object.

func (SummarySummaryResultsChecks) Equals

Equals tests the equality of two `SummarySummaryResultsChecks` objects.

func (*SummarySummaryResultsChecks) UnmarshalJSONStrict

func (resource *SummarySummaryResultsChecks) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `SummarySummaryResultsChecks` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (SummarySummaryResultsChecks) Validate

func (resource SummarySummaryResultsChecks) Validate() error

Validate checks all the validation constraints that may be defined on `SummarySummaryResultsChecks` fields for violations and returns them.

type SummarySummaryResultsChecksBuilder

type SummarySummaryResultsChecksBuilder struct {
	// contains filtered or unexported fields
}

func NewSummarySummaryResultsChecksBuilder

func NewSummarySummaryResultsChecksBuilder() *SummarySummaryResultsChecksBuilder

func (*SummarySummaryResultsChecksBuilder) Build

func (*SummarySummaryResultsChecksBuilder) Metrics

Array of check-related metrics

func (*SummarySummaryResultsChecksBuilder) Results

Individual check results in execution order

type SummarySummaryResultsChecksResults

type SummarySummaryResultsChecksResults struct {
	// Number of times the check failed
	Fails int64 `json:"fails"`
	// Check name
	Name string `json:"name"`
	// Number of times the check passed
	Passes int64 `json:"passes"`
}

Modified by compiler pass 'AnonymousStructsToNamed'

func NewSummarySummaryResultsChecksResults

func NewSummarySummaryResultsChecksResults() *SummarySummaryResultsChecksResults

NewSummarySummaryResultsChecksResults creates a new SummarySummaryResultsChecksResults object.

func (SummarySummaryResultsChecksResults) Equals

Equals tests the equality of two `SummarySummaryResultsChecksResults` objects.

func (*SummarySummaryResultsChecksResults) UnmarshalJSONStrict

func (resource *SummarySummaryResultsChecksResults) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `SummarySummaryResultsChecksResults` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (SummarySummaryResultsChecksResults) Validate

func (resource SummarySummaryResultsChecksResults) Validate() error

Validate checks all the validation constraints that may be defined on `SummarySummaryResultsChecksResults` fields for violations and returns them.

type SummarySummaryResultsChecksResultsBuilder

type SummarySummaryResultsChecksResultsBuilder struct {
	// contains filtered or unexported fields
}

func NewSummarySummaryResultsChecksResultsBuilder

func NewSummarySummaryResultsChecksResultsBuilder() *SummarySummaryResultsChecksResultsBuilder

func (*SummarySummaryResultsChecksResultsBuilder) Build

func (*SummarySummaryResultsChecksResultsBuilder) Fails

Number of times the check failed

func (*SummarySummaryResultsChecksResultsBuilder) Name

Check name

func (*SummarySummaryResultsChecksResultsBuilder) Passes

Number of times the check passed

type TrendValues

type TrendValues struct {
	// Average (mean) value
	// Modified by compiler pass 'NotRequiredFieldAsNullableType[nullable=true]'
	Avg *float64 `json:"avg,omitempty"`
	// Maximum value
	// Modified by compiler pass 'NotRequiredFieldAsNullableType[nullable=true]'
	Max *float64 `json:"max,omitempty"`
	// Median value
	// Modified by compiler pass 'NotRequiredFieldAsNullableType[nullable=true]'
	Med *float64 `json:"med,omitempty"`
	// Minimum value
	// Modified by compiler pass 'NotRequiredFieldAsNullableType[nullable=true]'
	Min *float64 `json:"min,omitempty"`
	// 90th percentile
	// Modified by compiler pass 'NotRequiredFieldAsNullableType[nullable=true]'
	P90 *float64 `json:"p(90),omitempty"`
	// 95th percentile
	// Modified by compiler pass 'NotRequiredFieldAsNullableType[nullable=true]'
	P95 *float64 `json:"p(95),omitempty"`
}

func NewTrendValues

func NewTrendValues() *TrendValues

NewTrendValues creates a new TrendValues object.

func (TrendValues) Equals

func (resource TrendValues) Equals(other TrendValues) bool

Equals tests the equality of two `TrendValues` objects.

func (*TrendValues) UnmarshalJSONStrict

func (resource *TrendValues) UnmarshalJSONStrict(raw []byte) error

UnmarshalJSONStrict implements a custom JSON unmarshalling logic to decode `TrendValues` from JSON. Note: the unmarshalling done by this function is strict. It will fail over required fields being absent from the input, fields having an incorrect type, unexpected fields being present, …

func (TrendValues) Validate

func (resource TrendValues) Validate() error

Validate checks all the validation constraints that may be defined on `TrendValues` fields for violations and returns them.

type TrendValuesBuilder

type TrendValuesBuilder struct {
	// contains filtered or unexported fields
}

func NewTrendValuesBuilder

func NewTrendValuesBuilder() *TrendValuesBuilder

func (*TrendValuesBuilder) Avg

func (builder *TrendValuesBuilder) Avg(avg float64) *TrendValuesBuilder

Average (mean) value

func (*TrendValuesBuilder) Build

func (builder *TrendValuesBuilder) Build() (TrendValues, error)

func (*TrendValuesBuilder) Max

func (builder *TrendValuesBuilder) Max(max float64) *TrendValuesBuilder

Maximum value

func (*TrendValuesBuilder) Med

func (builder *TrendValuesBuilder) Med(med float64) *TrendValuesBuilder

Median value

func (*TrendValuesBuilder) Min

func (builder *TrendValuesBuilder) Min(min float64) *TrendValuesBuilder

Minimum value

func (*TrendValuesBuilder) P90

func (builder *TrendValuesBuilder) P90(p90 float64) *TrendValuesBuilder

90th percentile

func (*TrendValuesBuilder) P95

func (builder *TrendValuesBuilder) P95(p95 float64) *TrendValuesBuilder

95th percentile

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL