virtualuser

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusStarted   = "started"
	StatusSucceeded = "succeeded"
	StatusFailed    = "failed"
)

Variables

View Source
var (
	UserCount = stats.Int64("virtual_user/count", "Number of virtual users", stats.UnitDimensionless)

	KeyStatus, _ = tag.NewKey("virtual_user_status")

	UserCountView = &view.View{
		Name:        "virtual_user/count",
		Measure:     UserCount,
		TagKeys:     []tag.Key{KeyStatus},
		Description: "Count of virtual users by status",
		Aggregation: view.Count(),
	}
)

Functions

This section is empty.

Types

type Factory

type Factory func() (VirtualUser, error)

type Group

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

func NewGroup

func NewGroup(numUsers, hatchRate int, factory Factory) *Group

func (*Group) Run

func (g *Group) Run(ctx context.Context) error

func (*Group) Stop

func (g *Group) Stop(timeout time.Duration) error

type VirtualUser

type VirtualUser interface {
	Run(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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