loadtester

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layout added in v0.7.0

type Layout string
const (
	// LayoutSpeaker - one user at 1280x720, 5 at 356x200
	LayoutSpeaker Layout = "speaker"
	// LayoutGrid3x3 - 9 participants at 400x225
	LayoutGrid3x3 Layout = "3x3"
	// LayoutGrid4x4 - 16 participants at 320x180
	LayoutGrid4x4 Layout = "4x4"
	// LayoutGrid5x5 - 25 participants at 256x144
	LayoutGrid5x5 Layout = "5x5"
)

func LayoutFromString added in v0.7.0

func LayoutFromString(str string) Layout

type LoadTest

type LoadTest struct {
	Params Params
	// contains filtered or unexported fields
}

func NewLoadTest

func NewLoadTest(params Params) *LoadTest

func (*LoadTest) Run

func (t *LoadTest) Run() error

func (*LoadTest) RunSuite

func (t *LoadTest) RunSuite() error

type LoadTestProvider added in v0.7.0

type LoadTestProvider struct {
	BytesPerSample uint32
	SampleDuration time.Duration
}

LoadTestProvider is designed to be used with the load tester. It provides packets that are encoded with sequence and timing information, in order determine RTT and loss

func NewLoadTestProvider added in v0.7.0

func NewLoadTestProvider(bitrate uint32) (*LoadTestProvider, error)

func (*LoadTestProvider) NextSample added in v0.7.0

func (p *LoadTestProvider) NextSample() (media.Sample, error)

func (*LoadTestProvider) OnBind added in v0.7.0

func (p *LoadTestProvider) OnBind() error

func (*LoadTestProvider) OnUnbind added in v0.7.0

func (p *LoadTestProvider) OnUnbind() error

type LoadTester

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

func NewLoadTester

func NewLoadTester(params TesterParams) *LoadTester

func (*LoadTester) GetStats

func (t *LoadTester) GetStats() *testerStats

func (*LoadTester) IsRunning

func (t *LoadTester) IsRunning() bool

func (*LoadTester) PublishSimulcastTrack added in v0.7.0

func (t *LoadTester) PublishSimulcastTrack(name string, bitrate uint32) (string, error)

func (*LoadTester) PublishTrack

func (t *LoadTester) PublishTrack(name string, kind lksdk.TrackKind, bitrate uint32) (string, error)

func (*LoadTester) Reset

func (t *LoadTester) Reset()

func (*LoadTester) Start

func (t *LoadTester) Start() error

func (*LoadTester) Stop

func (t *LoadTester) Stop()

type Params

type Params struct {
	Context      context.Context
	Publishers   int
	Subscribers  int
	AudioBitrate uint32
	VideoBitrate uint32
	Duration     time.Duration
	// number of seconds to spin up per second
	NumPerSecond float64
	Simulcast    bool

	TesterParams
}

type TesterParams

type TesterParams struct {
	URL            string
	APIKey         string
	APISecret      string
	Room           string
	IdentityPrefix string
	Layout         Layout
	// true to subscribe to all published tracks
	Subscribe bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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