# Functions
CompatibilityModeString retrieves an enum value from the enum constants string name.
CompatibilityModeValues returns all values of the enum.
ConcatErrors is a a helper function for joining error messages into a single string.
No description provided by the author
ExecutionStatusString retrieves an enum value from the enum constants string name.
ExecutionStatusValues returns all values of the enum.
GetEndOffset returns the time offset of the last step of the execution plan, and whether that step is a final one, i.e.
GetExecutionState returns an ExecutionState from ctx.
GetFilledExecutionSegmentSequence makes sure we don't have any gaps in the given execution segment sequence, or a nil one.
GetMaxPlannedVUs returns the maximum number of planned VUs at any stage of the execution plan.
GetMaxPossibleVUs returns the maximum number of planned + unplanned (i.e.
GetParsedExecutorConfig returns a struct instance corresponding to the supplied config type.
GetScenarioState returns a ScenarioState from ctx.
No description provided by the author
No description provided by the author
Returns the maximum value of a and b.
Returns the minimum value of a and b.
Creates a new check with the given name and parent group.
NewExecutionSegment validates the supplied arguments (basically, that 0 <= from < to <= 1) and either returns an error, or it returns a fully-initialized and usable execution segment.
NewExecutionSegmentFromString validates the supplied string value and returns the newly created ExecutionSegment or and error from it.
NewExecutionSegmentSequence validates the that the supplied execution segments are non-overlapping and without gaps.
NewExecutionSegmentSequenceFromString parses strings of the format "r1,r2,r3,...,rn", which represents the sequences like (r1, r2], (r2, r3], (r3, r4], ..., (r{n-1}, rn].
NewExecutionSegmentSequenceWrapper expects a filled-out execution segment sequence.
NewExecutionState initializes all of the pointers in the ExecutionState with zeros.
NewExecutionTuple returns a new ExecutionTuple for the provided segment and sequence.
Creates a new group with the given name and parent group.
NewHostAddress creates a pointer to a new address with an IP object.
NewMultiSlotLimiter initializes and returns a new MultiSlotLimiter with the given slot count TODO: move to lib and use something better than a mutex? sync.Map perhaps?.
NewSegmentedIndex returns a pointer to a new SegmentedIndex instance, given an ExecutionTuple.
NewSlotLimiter initializes and returns a new SlotLimiter with the given slot count.
NewTagMap creates a TagMap, if a not-nil map is passed then it will be used as the internal map otherwise a new one will be created.
ParseCIDR creates an IPNet out of a CIDR string.
RegisterExecutorConfigType adds the supplied ExecutorConfigConstructor as the constructor for its type in the configConstructors map, in a thread-safe manner.
StrictJSONUnmarshal decodes a JSON in a strict manner, emitting an error if there are unknown fields or unexpected data.
No description provided by the author
ValidateCompatibilityMode checks if the provided val is a valid compatibility mode.
WithExecutionState embeds an ExecutionState in ctx.
WithScenarioState embeds a ScenarioState in ctx.
# Constants
CompatibilityModeBase is standard goja ES5.1+.
CompatibilityModeExtended achieves ES6+ compatibility with Babel.
DefaultScenarioName is used as the default key/ID of the scenario config entries that were created due to the use of the shortcut execution control options (i.e.
Possible execution status values.
Possible execution status values.
Possible execution status values.
Possible execution status values.
Possible execution status values.
Possible execution status values.
Possible execution status values.
Possible execution status values.
Possible execution status values.
Possible execution status values.
Possible execution status values.
Separator for group IDs.
MaxRetriesGetPlannedVU how many times we should wait for MaxTimeToWaitForPlannedVU before we actually return an error.
MaxTimeToWaitForPlannedVU specifies the maximum allowable time for an executor to wait for a planned VU to be retrieved from the ExecutionState.PlannedVUs buffer.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
Possible run status values; iota isn't used intentionally.
# Variables
DefaultSummaryTrendStats are the default trend columns shown in the test summary outputnolint:gochecknoglobals.
Error emitted if you attempt to instantiate a Group or Check that contains the separator.
SupportedTLSCipherSuites is string-to-constant map of available TLS cipher suites.nolint:gochecknoglobals.
SupportedTLSCipherSuitesToString is constant-to-string map of available TLS cipher suites.nolint:gochecknoglobals.
SupportedTLSVersions is string-to-constant map of available TLS versions.nolint:gochecknoglobals.
SupportedTLSVersionsToString is constant-to-string map of available TLS versions.nolint:gochecknoglobals.
# Structs
A Check stores a series of successful or failing tests against a value.
No description provided by the author
No description provided by the author
ExecutionSegment represents a (start, end] partition of the total execution work for a specific test.
ExecutionSegmentSequenceWrapper is a caching layer on top of the execution segment sequence that allows us to make fast and useful calculations, after a somewhat slow initialization.
ExecutionState contains a few different things: - Some convenience items, that are needed by all executors, like the execution segment and the unique VU ID generator.
ExecutionStep is used by different executors to specify the planned number of VUs they will need at a particular time.
ExecutionTuple is the combination of an ExecutionSegmentSequence(Wrapper) and a specific ExecutionSegment from it.
A Group is an organisational block, that samples and checks may be tagged with.
IPNet is a wrapper around net.IPNet for JSON unmarshalling.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MultiSlotLimiter can restrict the concurrent execution of different groups of tasks to the given `slots` limit.
No description provided by the author
RuntimeOptions are settings passed onto the goja JS runtime.
ScenarioState holds runtime scenario information returned by the k6/execution JS module.
SegmentedIndex is an iterator that returns both the scaled and the unscaled sequential values according to the given ExecutionTuple.
StageFields defines the fields used for a Stage; this is a dumb hack to make the JSON code cleaner.
State provides the volatile state for a VU.
Summary contains all of the data the summary handler gets.
TagMap is a safe-concurrent Tags lookup.
TestPreInitState contains all of the state that can be gathered and built before the test run is initialized.
TestRunState contains the pre-init state as well as all of the state and options that are necessary for actually running the test.
Defines a TLS client certificate to present to certain hosts.
Fields for TLSAuth.
Fields for TLSVersions.
VUActivationParams are supplied by each executor when it retrieves a VU from the buffer pool and activates it for use.
No description provided by the author
No description provided by the author
# Interfaces
ActiveVU represents an actively running virtual user.
No description provided by the author
DialContexter is an interface that can dial with a context.
An ExecutionScheduler is in charge of initializing executors and using them to initialize and schedule VUs created by a wrapped Runner.
Executor is the interface all executors should implement.
ExecutorConfig is an interface that should be implemented by all executor config types.
InitializedVU represents a virtual user ready for work.
LiveUpdatableExecutor should be implemented for the executors whose configuration can be modified in the middle of the test execution.
PausableExecutor should be implemented by the executors that can be paused and resumed in the middle of the test execution.
A Runner is a factory for VUs.
# Type aliases
CompatibilityMode specifies the JS compatibility modenolint:lllgo:generate enumer -type=CompatibilityMode -transform=snake -trimprefix CompatibilityMode -output compatibility_mode_gen.go.
ExecutionSegmentSequence represents an ordered chain of execution segments, where the end of one segment is the beginning of the next.
ExecutionStatus is similar to RunStatus, but more fine grained and concerns only local execution.
ExecutorConfigConstructor is a simple function that returns a concrete Config instance with the specified name and all default values correctly initialized.
HostAddress stores information about IP and port for a host.
InitVUFunc is just a shorthand so we don't have to type the function signature every time.
RunStatus values can be used by k6 to denote how a script run ends and by the cloud executor and collector so that k6 knows the current status of a particular script run.
ScenarioConfigs can contain mixed executor config types.
A Stage defines a step in a test's timeline.
A list of TLS cipher suites.
Describes a TLS version.
Describes a set (min/max) of TLS versions.