metrics

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPlaybackMetricsRepresentation added in v0.0.12

func GetPlaybackMetricsRepresentation() int

GetPlaybackMetricsRepresentation returns what percentage of all known players the metrics represent.

func GetStreamHealthOverview added in v0.0.12

func GetStreamHealthOverview() *models.StreamHealthOverview

GetStreamHealthOverview will return the stream health overview.

func RegisterPlaybackErrorCount added in v0.0.12

func RegisterPlaybackErrorCount(clientID string, count float64)

RegisterPlaybackErrorCount will add to the windowed playback error count.

func RegisterPlayerBandwidth added in v0.0.12

func RegisterPlayerBandwidth(clientID string, kbps float64)

RegisterPlayerBandwidth will add to the windowed playback bandwidth.

func RegisterPlayerLatency added in v0.0.12

func RegisterPlayerLatency(clientID string, seconds float64)

RegisterPlayerLatency will add to the windowed player latency values.

func RegisterPlayerSegmentDownloadDuration added in v0.0.12

func RegisterPlayerSegmentDownloadDuration(clientID string, seconds float64)

RegisterPlayerSegmentDownloadDuration will add to the windowed player segment download duration values.

func RegisterQualityVariantChangesCount added in v0.0.12

func RegisterQualityVariantChangesCount(clientID string, count float64)

RegisterQualityVariantChangesCount will add to the windowed quality variant change count.

func Start

func Start(getStatus func() models.Status)

Start will begin the metrics collection and alerting.

Types

type CollectedMetrics

type CollectedMetrics struct {
	DiskUtilizations []TimestampedValue `json:"disk"`

	RAMUtilizations []TimestampedValue `json:"memory"`

	CPUUtilizations []TimestampedValue `json:"cpu"`
	// contains filtered or unexported fields
}

CollectedMetrics stores different collected + timestamped values.

func GetMetrics added in v0.0.12

func GetMetrics() *CollectedMetrics

GetMetrics will return the collected metrics.

type TimestampedValue added in v0.0.12

type TimestampedValue struct {
	Time  time.Time `json:"time"`
	Value float64   `json:"value"`
}

TimestampedValue is a value with a timestamp.

func GetChatClientCountOverTime added in v0.0.12

func GetChatClientCountOverTime(start, end time.Time) []TimestampedValue

GetChatClientCountOverTime will return a window of connected chat clients over time.

func GetMaxDownloadRateOverTime added in v0.0.12

func GetMaxDownloadRateOverTime() []TimestampedValue

GetMaxDownloadRateOverTime will return the collected highest bandwidth values.

func GetMaximumDownloadDurationsOverTime added in v0.0.12

func GetMaximumDownloadDurationsOverTime() []TimestampedValue

GetMaximumDownloadDurationsOverTime will return a maximum durations errors over time.

func GetMaximumDownloadRateOverTime added in v0.0.12

func GetMaximumDownloadRateOverTime() []TimestampedValue

GetMaximumDownloadRateOverTime will return the collected maximum bandwidth values.

func GetMaximumLatencyOverTime added in v0.0.12

func GetMaximumLatencyOverTime() []TimestampedValue

GetMaximumLatencyOverTime will return the max latency values over time.

func GetMedianDownloadDurationsOverTime added in v0.0.12

func GetMedianDownloadDurationsOverTime() []TimestampedValue

GetMedianDownloadDurationsOverTime will return a window of durations errors over time.

func GetMedianDownloadRateOverTime added in v0.0.12

func GetMedianDownloadRateOverTime() []TimestampedValue

GetMedianDownloadRateOverTime will return the collected median bandwidth values.

func GetMedianLatencyOverTime added in v0.0.12

func GetMedianLatencyOverTime() []TimestampedValue

GetMedianLatencyOverTime will return the median latency values over time.

func GetMinimumDownloadDurationsOverTime added in v0.0.12

func GetMinimumDownloadDurationsOverTime() []TimestampedValue

GetMinimumDownloadDurationsOverTime will return a maximum durations errors over time.

func GetMinimumDownloadRateOverTime added in v0.0.12

func GetMinimumDownloadRateOverTime() []TimestampedValue

GetMinimumDownloadRateOverTime will return the collected minimum bandwidth values.

func GetMinimumLatencyOverTime added in v0.0.12

func GetMinimumLatencyOverTime() []TimestampedValue

GetMinimumLatencyOverTime will return the min latency values over time.

func GetPlaybackErrorCountOverTime added in v0.0.12

func GetPlaybackErrorCountOverTime() []TimestampedValue

GetPlaybackErrorCountOverTime will return a window of playback errors over time.

func GetQualityVariantChangesOverTime added in v0.0.12

func GetQualityVariantChangesOverTime() []TimestampedValue

GetQualityVariantChangesOverTime will return the collected quality variant changes.

func GetSlowestDownloadRateOverTime added in v0.0.12

func GetSlowestDownloadRateOverTime() []TimestampedValue

GetSlowestDownloadRateOverTime will return the collected lowest bandwidth values over time.

func GetViewersOverTime added in v0.0.12

func GetViewersOverTime(start, end time.Time) []TimestampedValue

GetViewersOverTime will return a window of viewer counts over time.

Jump to

Keyboard shortcuts

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