stats

package
v0.0.0-...-1b4a0e4 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Sessions = prometheus.NewGauge(prometheus.GaugeOpts{
		Subsystem: "sfu",
		Name:      "sessions",
		Help:      "Current number of sessions",
	})

	Peers = prometheus.NewGauge(prometheus.GaugeOpts{
		Subsystem: "sfu",
		Name:      "peers",
		Help:      "Current number of peers connected",
	})

	AudioTracks = prometheus.NewGauge(prometheus.GaugeOpts{
		Subsystem: "sfu",
		Name:      "audio_tracks",
		Help:      "Current number of audio tracks",
	})

	VideoTracks = prometheus.NewGauge(prometheus.GaugeOpts{
		Subsystem: "sfu",
		Name:      "video_tracks",
		Help:      "Current number of video tracks",
	})
)

Functions

func InitStats

func InitStats()

Types

type Stream

type Stream struct {
	sync.RWMutex
	Buffer *buffer.Buffer
	// contains filtered or unexported fields
}

Stream contains buffer statistics

func NewStream

func NewStream(buffer *buffer.Buffer) *Stream

NewStream constructs a new Stream

func (*Stream) CalcStats

func (s *Stream) CalcStats()

func (*Stream) GetCName

func (s *Stream) GetCName() string

GetCName returns the cname for a given stream

func (*Stream) GetDriftInMillis

func (s *Stream) GetDriftInMillis() uint64

func (*Stream) SetCName

func (s *Stream) SetCName(cname string)

func (*Stream) SetDriftInMillis

func (s *Stream) SetDriftInMillis(driftInMillis uint64)

func (*Stream) UpdateStats

func (s *Stream) UpdateStats(stats buffer.Stats) (hasDiff bool, diffStats buffer.Stats)

Jump to

Keyboard shortcuts

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