Documentation
¶
Overview ¶
Package data implements `k6/data` js module for k6. This modules provide utility types to work with data in an efficient way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶ added in v0.36.0
type Data struct {
// contains filtered or unexported fields
}
Data represents an instance of the data module.
func (*Data) NewSharedArrayFrom ¶ added in v0.54.0
NewSharedArrayFrom creates a new shared array from the provided data.
This function is not exposed to the JS runtime. It is used internally to instantiate shared arrays without having to go through the whole JS runtime machinery, which effectively has a big performance impact (e.g. when filling a shared array from a CSV file).
This function takes an explicit runtime argument to retain control over which VU runtime it is executed in. This is important because the shared array underlying implementation relies on maintaining a single instance of arrays for the whole test setup and VUs.
type RecordReader ¶ added in v0.54.0
RecordReader is the interface that wraps the action of reading records from a resource.
The data module RecordReader interface is implemented by types that can read data that can be treated as records, from data sources such as a CSV file, etc.
type RootModule ¶ added in v0.36.0
type RootModule struct {
// contains filtered or unexported fields
}
RootModule is the global module instance that will create module instances for each VU.
func (*RootModule) NewModuleInstance ¶ added in v0.36.0
func (rm *RootModule) NewModuleInstance(vu modules.VU) modules.Instance
NewModuleInstance implements the modules.Module interface to return a new instance for each VU.