loadtester

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 27 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(ctx context.Context) error

func (*LoadTest) RunSuite

func (t *LoadTest) RunSuite(ctx context.Context) error

type LoadTestDepacketizer added in v1.2.0

type LoadTestDepacketizer struct {
}

func (*LoadTestDepacketizer) IsPartitionHead added in v1.2.0

func (d *LoadTestDepacketizer) IsPartitionHead(payload []byte) bool

func (*LoadTestDepacketizer) IsPartitionTail added in v1.2.0

func (d *LoadTestDepacketizer) IsPartitionTail(marker bool, payload []byte) bool

func (*LoadTestDepacketizer) Unmarshal added in v1.2.0

func (d *LoadTestDepacketizer) Unmarshal(packet []byte) ([]byte, 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) IsRunning

func (t *LoadTester) IsRunning() bool

func (*LoadTester) PublishAudioTrack added in v0.8.0

func (t *LoadTester) PublishAudioTrack(name string) (string, error)

func (*LoadTester) PublishSimulcastTrack added in v0.7.0

func (t *LoadTester) PublishSimulcastTrack(name, resolution, codec string) (string, error)

func (*LoadTester) PublishVideoTrack added in v0.8.0

func (t *LoadTester) PublishVideoTrack(name, resolution, codec string) (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 {
	VideoPublishers int
	AudioPublishers int
	Subscribers     int
	VideoResolution string
	VideoCodec      string
	Duration        time.Duration
	// number of seconds to spin up per second
	NumPerSecond     float64
	Simulcast        bool
	SimulateSpeakers bool

	TesterParams
}

type SpeakerSimulator added in v1.2.5

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

func NewSpeakerSimulator added in v1.2.5

func NewSpeakerSimulator(params SpeakerSimulatorParams) *SpeakerSimulator

func (*SpeakerSimulator) Start added in v1.2.5

func (s *SpeakerSimulator) Start()

func (*SpeakerSimulator) Stop added in v1.2.5

func (s *SpeakerSimulator) Stop()

type SpeakerSimulatorParams added in v1.2.5

type SpeakerSimulatorParams struct {
	Testers []*LoadTester
	// amount of time between each speaker
	Pause uint64
}

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

	Sequence int
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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