Documentation ¶
Overview ¶
Package main is the entry point for the k6 CLI application. It assembles all the crucial components for the running.
Directories ¶
Path | Synopsis |
---|---|
Package api contains the REST API implementation for k6.
|
Package api contains the REST API implementation for k6. |
v1
Package v1 implements the v1 of the k6's REST API
|
Package v1 implements the v1 of the k6's REST API |
v1/client
Package client provides a simple go-client for the k6's REST API.
|
Package client provides a simple go-client for the k6's REST API. |
Package cloudapi contains several things related to the k6 cloud - various data and config structures, a REST API client, log streaming logic, etc.
|
Package cloudapi contains several things related to the k6 cloud - various data and config structures, a REST API client, log streaming logic, etc. |
insights
Package insights contains the domain data structures and client logic for the k6 cloud Insights API.
|
Package insights contains the domain data structures and client logic for the k6 cloud Insights API. |
insights/proto
Package proto contains the Protobuf definitions used by the k6 Insights.
|
Package proto contains the Protobuf definitions used by the k6 Insights. |
Package cmd implements the command-line interface of k6.
|
Package cmd implements the command-line interface of k6. |
state
Package state contains the types and functionality used for keeping track of cmd-related values that are used globally throughout k6.
|
Package state contains the types and functionality used for keeping track of cmd-related values that are used globally throughout k6. |
tests
Package tests contains integration tests that run k6 commands, and interact with standard I/O streams.
|
Package tests contains integration tests that run k6 commands, and interact with standard I/O streams. |
tests/events
Package events is used for testing the event functionality.
|
Package events is used for testing the event functionality. |
Package errext contains extensions for normal Go errors that are used in k6.
|
Package errext contains extensions for normal Go errors that are used in k6. |
exitcodes
Package exitcodes contains the constants representing possible k6 exit error codes.
|
Package exitcodes contains the constants representing possible k6 exit error codes. |
Package event contains the event system used to notify external components of various internal events during test execution.
|
Package event contains the event system used to notify external components of various internal events during test execution. |
Package execution contains most of the components that schedule, execute and control individual k6 tests.
|
Package execution contains most of the components that schedule, execute and control individual k6 tests. |
local
Package local implements the execution.Controller interface for local (single-machine) k6 execution.
|
Package local implements the execution.Controller interface for local (single-machine) k6 execution. |
Package ext contains the extension registry and all generic functionality for k6 extensions.
|
Package ext contains the extension registry and all generic functionality for k6 extensions. |
Package js is the JavaScript implementation of the lib.Runner and relative concepts for executing concurrent-safe JavaScript code.
|
Package js is the JavaScript implementation of the lib.Runner and relative concepts for executing concurrent-safe JavaScript code. |
common
Package common contains helpers for interacting with the JavaScript runtime.
|
Package common contains helpers for interacting with the JavaScript runtime. |
compiler
Package compiler implements additional functionality for k6 to compile js code.
|
Package compiler implements additional functionality for k6 to compile js code. |
eventloop
Package eventloop implements an event loop to be used thought js and it's subpackages
|
Package eventloop implements an event loop to be used thought js and it's subpackages |
modules
Package modules defines interfaces used for developing k6's JavaScript modules.
|
Package modules defines interfaces used for developing k6's JavaScript modules. |
modules/k6
Package k6 implements the module imported as 'k6' from inside k6.
|
Package k6 implements the module imported as 'k6' from inside k6. |
modules/k6/crypto
Package crypto provides common hashing function for the k6
|
Package crypto provides common hashing function for the k6 |
modules/k6/crypto/x509
Package x509 provides X.509 certificate parsing for the k6
|
Package x509 provides X.509 certificate parsing for the k6 |
modules/k6/data
Package data implements `k6/data` js module for k6.
|
Package data implements `k6/data` js module for k6. |
modules/k6/encoding
Package encoding provides encoding/decoding functionality for the k6
|
Package encoding provides encoding/decoding functionality for the k6 |
modules/k6/execution
Package execution implements k6/execution which lets script find out more about it is execution.
|
Package execution implements k6/execution which lets script find out more about it is execution. |
modules/k6/experimental
Package experimental includes experimental module features
|
Package experimental includes experimental module features |
modules/k6/experimental/csv
Package csv provides a CSV parser for k6.
|
Package csv provides a CSV parser for k6. |
modules/k6/experimental/fs
Package fs provides a k6 module that allows users to interact with files from the local filesystem as per the [File API design document].
|
Package fs provides a k6 module that allows users to interact with files from the local filesystem as per the [File API design document]. |
modules/k6/experimental/streams
Package streams provides support for the Web Streams API.
|
Package streams provides support for the Web Streams API. |
modules/k6/experimental/tracing
Package tracing implements a k6 JS module for instrumenting k6 scripts with tracing context information.
|
Package tracing implements a k6 JS module for instrumenting k6 scripts with tracing context information. |
modules/k6/grpc
Package grpc is the root module of the k6-grpc extension.
|
Package grpc is the root module of the k6-grpc extension. |
modules/k6/html
generated by js/modules/k6/html/gen/gen_elements.go; DO NOT EDIT
|
generated by js/modules/k6/html/gen/gen_elements.go; DO NOT EDIT |
modules/k6/html/gen
Package main - this package generates some of the code for k6/html
|
Package main - this package generates some of the code for k6/html |
modules/k6/http
Package http implements the k6/http js module for k6.
|
Package http implements the k6/http js module for k6. |
modules/k6/metrics
Package metrics implements k6/metrics and let script work with custom metrics.
|
Package metrics implements k6/metrics and let script work with custom metrics. |
modules/k6/timers
Package timers is implementing setInterval setTimeout and co.
|
Package timers is implementing setInterval setTimeout and co. |
modules/k6/ws
Package ws implements a k6/ws for k6.
|
Package ws implements a k6/ws for k6. |
modulestest
Package modulestest contains helpers to test js modules
|
Package modulestest contains helpers to test js modules |
promises
Package promises provides helpers for working with promises in k6.
|
Package promises provides helpers for working with promises in k6. |
Package lib is a kitchen sink of...
|
Package lib is a kitchen sink of... |
consts
Package consts houses some constants needed across k6
|
Package consts houses some constants needed across k6 |
executor
Package executor defines the executors k6 can use.
|
Package executor defines the executors k6 can use. |
fsext
Package fsext provides extended file system functions
|
Package fsext provides extended file system functions |
netext
Package netext provides extensions to the standard net package
|
Package netext provides extensions to the standard net package |
netext/grpcext
Package grpcext allows gRPC requests collecting stats info.
|
Package grpcext allows gRPC requests collecting stats info. |
netext/httpext
Package httpext provides extensions to the standard net/http package
|
Package httpext provides extensions to the standard net/http package |
strvals
Package strvals provides parsing utilities for strval lines, which follow the format: name=value,topname.subname=value.
|
Package strvals provides parsing utilities for strval lines, which follow the format: name=value,topname.subname=value. |
testutils
Package testutils contains the test utilities and helpers inside the k6 project.
|
Package testutils contains the test utilities and helpers inside the k6 project. |
testutils/grpcservice
Package grpcservice contains the implementation of the test GRPC service.
|
Package grpcservice contains the implementation of the test GRPC service. |
testutils/httpmultibin
Package httpmultibin is intended only for use in tests, do not import in production code!
|
Package httpmultibin is intended only for use in tests, do not import in production code! |
testutils/httpmultibin/grpc_wrappers_testing
Package grpc_wrappers_testing provides a test service that could be used for the testing gRPC wrappers
|
Package grpc_wrappers_testing provides a test service that could be used for the testing gRPC wrappers |
testutils/minirunner
Package minirunner provides a mock implementation of the lib.Runner We use it in tests
|
Package minirunner provides a mock implementation of the lib.Runner We use it in tests |
testutils/mockoutput
Package mockoutput implements a mock output for testing purposes.
|
Package mockoutput implements a mock output for testing purposes. |
testutils/mockresolver
Package mockresolver provides a mock implementation of netext.Resolver.
|
Package mockresolver provides a mock implementation of netext.Resolver. |
trace
Package trace provides functionalities for tracing instrumentation.
|
Package trace provides functionalities for tracing instrumentation. |
types
Package types contains types used in the codebase Most of the types have a Null prefix like gopkg.in/guregu/null.v3 and UnmarshalJSON and MarshalJSON methods.
|
Package types contains types used in the codebase Most of the types have a Null prefix like gopkg.in/guregu/null.v3 and UnmarshalJSON and MarshalJSON methods. |
Package loader is about loading files from either the filesystem or through https requests.
|
Package loader is about loading files from either the filesystem or through https requests. |
Package log implements various logrus hooks.
|
Package log implements various logrus hooks. |
Package metrics contains various k6 components that deal with metrics and thresholds.
|
Package metrics contains various k6 components that deal with metrics and thresholds. |
engine
Package engine contains the internal metrics engine responsible for aggregating metrics during the test and evaluating thresholds against them.
|
Package engine contains the internal metrics engine responsible for aggregating metrics during the test and evaluating thresholds against them. |
Package output contains the interfaces that k6 outputs (and output extensions) have to implement, as well as some helpers to make their implementation and management easier.
|
Package output contains the interfaces that k6 outputs (and output extensions) have to implement, as well as some helpers to make their implementation and management easier. |
cloud
Package cloud implements an Output that flushes to the k6 Cloud platform.
|
Package cloud implements an Output that flushes to the k6 Cloud platform. |
cloud/expv2
Package expv2 contains a Cloud output using a Protobuf binary format for encoding payloads.
|
Package expv2 contains a Cloud output using a Protobuf binary format for encoding payloads. |
cloud/expv2/pbcloud
Package pbcloud contains the Protobuf definitions used for the metrics flush RPCs.
|
Package pbcloud contains the Protobuf definitions used for the metrics flush RPCs. |
cloud/insights
Package insights contains the logic for the k6 cloud insights output.
|
Package insights contains the logic for the k6 cloud insights output. |
csv
Package csv implements an output writing metrics in csv format
|
Package csv implements an output writing metrics in csv format |
influxdb
Package influxdb provides an output plugin for sending results directly to InfluxDB v1.
|
Package influxdb provides an output plugin for sending results directly to InfluxDB v1. |
json
Package json is implements an output to put metrics in a json file.
|
Package json is implements an output to put metrics in a json file. |
statsd
Package statsd is implements an output to send metric samples to a statsd server.
|
Package statsd is implements an output to send metric samples to a statsd server. |
Package ui contains some generic UI k6 components.
|
Package ui contains some generic UI k6 components. |
console
Package console implements the command-line UI for k6.
|
Package console implements the command-line UI for k6. |
pb
Package pb implements a progressbar component for CLI user interfaces
|
Package pb implements a progressbar component for CLI user interfaces |
Package usage implements usage tracking for k6 in order to figure what is being used within a given execution
|
Package usage implements usage tracking for k6 in order to figure what is being used within a given execution |
Click to show internal directories.
Click to hide internal directories.