Documentation ¶
Index ¶
- type Bundle
- type BundleInstance
- type Console
- func (c Console) Debug(ctx *context.Context, msg goja.Value, args ...goja.Value)
- func (c Console) Error(ctx *context.Context, msg goja.Value, args ...goja.Value)
- func (c Console) Info(ctx *context.Context, msg goja.Value, args ...goja.Value)
- func (c Console) Log(ctx *context.Context, msg goja.Value, args ...goja.Value)
- func (c Console) Warn(ctx *context.Context, msg goja.Value, args ...goja.Value)
- type InitContext
- type Runner
- func (r *Runner) GetDefaultGroup() *lib.Group
- func (r *Runner) GetOptions() lib.Options
- func (r *Runner) GetSetupData() interface{}
- func (r *Runner) MakeArchive() *lib.Archive
- func (r *Runner) NewVU(samplesOut chan<- stats.SampleContainer) (lib.VU, error)
- func (r *Runner) SetOptions(opts lib.Options)
- func (r *Runner) SetSetupData(data interface{})
- func (r *Runner) Setup(ctx context.Context, out chan<- stats.SampleContainer) error
- func (r *Runner) Teardown(ctx context.Context, out chan<- stats.SampleContainer) error
- type VU
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶ added in v0.13.0
type Bundle struct { Filename string Source string Program *goja.Program Options lib.Options BaseInitContext *InitContext Env map[string]string }
A Bundle is a self-contained bundle of scripts and resources. You can use this to produce identical BundleInstance objects.
func NewBundle ¶ added in v0.13.0
func NewBundle(src *lib.SourceData, fs afero.Fs, rtOpts lib.RuntimeOptions) (*Bundle, error)
Creates a new bundle from a source file and a filesystem.
func NewBundleFromArchive ¶ added in v0.15.0
func (*Bundle) Instantiate ¶ added in v0.13.0
func (b *Bundle) Instantiate() (bi *BundleInstance, instErr error)
Instantiate creates a new runtime from this bundle.
func (*Bundle) MakeArchive ¶ added in v0.15.0
type BundleInstance ¶ added in v0.13.0
A BundleInstance is a self-contained instance of a Bundle.
type Console ¶ added in v0.10.0
func NewConsole ¶ added in v0.13.0
func NewConsole() *Console
type InitContext ¶ added in v0.13.0
type InitContext struct {
// contains filtered or unexported fields
}
Provides APIs for use in the init context.
func NewInitContext ¶ added in v0.13.0
type Runner ¶
type Runner struct { Bundle *Bundle Logger *log.Logger BaseDialer net.Dialer Resolver *dnscache.Resolver RPSLimit *rate.Limiter // contains filtered or unexported fields }
func New ¶
func New(src *lib.SourceData, fs afero.Fs, rtOpts lib.RuntimeOptions) (*Runner, error)
func NewFromArchive ¶ added in v0.15.0
func NewFromBundle ¶ added in v0.15.0
func (*Runner) GetDefaultGroup ¶ added in v0.5.0
func (*Runner) GetOptions ¶
func (*Runner) GetSetupData ¶ added in v0.21.0
func (r *Runner) GetSetupData() interface{}
GetSetupData returns the setup data if Setup() was specified and executed, nil otherwise
func (*Runner) MakeArchive ¶ added in v0.15.0
func (*Runner) SetOptions ¶ added in v0.18.1
func (*Runner) SetSetupData ¶ added in v0.21.0
func (r *Runner) SetSetupData(data interface{})
SetSetupData saves the externally supplied setup data in the runner, so it can be used in VUs
type VU ¶
type VU struct { BundleInstance Runner *Runner HTTPTransport *netext.HTTPTransport Dialer *netext.Dialer CookieJar *cookiejar.Jar TLSConfig *tls.Config ID int64 Iteration int64 Console *Console BPool *bpool.BufferPool Samples chan<- stats.SampleContainer // contains filtered or unexported fields }
func (*VU) Reconfigure ¶
Click to show internal directories.
Click to hide internal directories.