js

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2017 License: AGPL-3.0 Imports: 27 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDefaultExport = errors.New("you must export a 'default' function")

Functions

func Check

func Check(val, arg0 otto.Value) (bool, error)

Types

type Console added in v0.10.0

type Console struct {
	Logger *log.Logger
}

func (Console) Log added in v0.10.0

func (c Console) Log(level int, msg string, args []otto.Value)

type HTTPParams added in v0.6.0

type HTTPParams struct {
	Headers map[string]string `json:"headers"`
	Tags    map[string]string `json:"tags"`
}

type HTTPResponse

type HTTPResponse struct {
	Status int
}

type InitAPI

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

func (*InitAPI) NewMetric

func (i *InitAPI) NewMetric(it int, name string, isTime bool) *stats.Metric

func (*InitAPI) Open added in v0.8.2

func (i *InitAPI) Open(name string) string

func (*InitAPI) Require

func (i *InitAPI) Require(name string) otto.Value

type JSAPI

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

func (JSAPI) DoCheck

func (a JSAPI) DoCheck(obj otto.Value, conds map[string]otto.Value, extraTags map[string]string) bool

func (JSAPI) DoGroup

func (a JSAPI) DoGroup(call otto.FunctionCall) otto.Value

func (JSAPI) ElapsedMs

func (a JSAPI) ElapsedMs() float64

func (JSAPI) HTMLParse

func (a JSAPI) HTMLParse(src string) *goquery.Selection

func (JSAPI) HTMLSelectionAddSelection

func (a JSAPI) HTMLSelectionAddSelection(vA, vB otto.Value) *goquery.Selection

func (JSAPI) HTTPRequest

func (a JSAPI) HTTPRequest(method, url, body string, paramData string) map[string]interface{}

func (JSAPI) MetricAdd

func (a JSAPI) MetricAdd(m *stats.Metric, v float64, tags map[string]string)

func (JSAPI) Sleep

func (a JSAPI) Sleep(secs float64)

type Runner

type Runner struct {
	Runtime      *Runtime
	DefaultGroup *lib.Group
	Options      lib.Options

	HTTPTransport *http.Transport
}

func NewRunner

func NewRunner(rt *Runtime, exports otto.Value) (*Runner, error)

func (*Runner) ApplyOptions

func (r *Runner) ApplyOptions(opts lib.Options)

func (*Runner) GetDefaultGroup added in v0.5.0

func (r *Runner) GetDefaultGroup() *lib.Group

func (*Runner) GetOptions

func (r *Runner) GetOptions() lib.Options

func (*Runner) NewVU

func (r *Runner) NewVU() (lib.VU, error)

type Runtime

type Runtime struct {
	VM      *otto.Otto
	Exports map[string]otto.Value
	Metrics map[string]*stats.Metric
	Options lib.Options
	// contains filtered or unexported fields
}

func New

func New() (*Runtime, error)

func (*Runtime) Load

func (r *Runtime) Load(src *lib.SourceData) (otto.Value, error)

type VU

type VU struct {
	ID        int64
	IDString  string
	Iteration int64
	Samples   []stats.Sample

	HTTPClient *http.Client
	CookieJar  *lib.CookieJar
	// contains filtered or unexported fields
}

func (*VU) Reconfigure

func (u *VU) Reconfigure(id int64) error

func (*VU) RunOnce

func (u *VU) RunOnce(ctx context.Context) ([]stats.Sample, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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