loadtester

package
v2.12.9 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentLoadTest added in v2.4.6

type AgentLoadTest struct {
	Params AgentLoadTestParams
}

func NewAgentLoadTest added in v2.4.6

func NewAgentLoadTest(params AgentLoadTestParams) *AgentLoadTest

func (*AgentLoadTest) Run added in v2.4.6

type AgentLoadTestParams added in v2.4.6

type AgentLoadTestParams struct {
	Rooms           int
	AgentName       string
	EchoSpeechDelay time.Duration
	Duration        time.Duration
	URL             string
	APIKey          string
	APISecret       string
}

type AgentLoadTester added in v2.4.6

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

func NewAgentLoadTester added in v2.4.6

func NewAgentLoadTester(params AgentLoadTestParams) *AgentLoadTester

func (*AgentLoadTester) Start added in v2.4.6

func (t *AgentLoadTester) Start(ctx context.Context) error

func (*AgentLoadTester) Stop added in v2.4.6

func (t *AgentLoadTester) Stop()

type Layout

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

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

type LoadTestDepacketizer struct {
}

func (*LoadTestDepacketizer) IsPartitionHead

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

func (*LoadTestDepacketizer) IsPartitionTail

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

func (*LoadTestDepacketizer) Unmarshal

func (d *LoadTestDepacketizer) Unmarshal(packet []byte) ([]byte, error)

type LoadTestProvider

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

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

func (*LoadTestProvider) NextSample

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

func (*LoadTestProvider) OnBind

func (p *LoadTestProvider) OnBind() error

func (*LoadTestProvider) OnUnbind

func (p *LoadTestProvider) OnUnbind() error

type LoadTestRoom added in v2.4.6

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

func NewLoadTestRoom added in v2.4.6

func NewLoadTestRoom(params AgentLoadTestParams) *LoadTestRoom

type LoadTestRoomStats added in v2.4.6

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

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

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

func (*LoadTester) PublishSimulcastTrack

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

func (*LoadTester) PublishVideoTrack

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

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

func NewSpeakerSimulator

func NewSpeakerSimulator(params SpeakerSimulatorParams) *SpeakerSimulator

func (*SpeakerSimulator) Start

func (s *SpeakerSimulator) Start()

func (*SpeakerSimulator) Stop

func (s *SpeakerSimulator) Stop()

type SpeakerSimulatorParams

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