dash

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package dash implements the DASH network experiment.

Spec: https://github.com/ooni/spec/blob/master/nettests/ts-021-dash.md

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExperimentMeasurer

func NewExperimentMeasurer(config Config) model.ExperimentMeasurer

NewExperimentMeasurer creates a new ExperimentMeasurer.

Types

type Config

type Config struct{}

Config contains the experiment config.

type Measurer

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

Measurer performs the measurement.

func (*Measurer) ExperimentName

func (m *Measurer) ExperimentName() string

ExperimentName implements model.ExperimentMeasurer.ExperimentName.

func (*Measurer) ExperimentVersion

func (m *Measurer) ExperimentVersion() string

ExperimentVersion implements model.ExperimentMeasurer.ExperimentVersion.

func (*Measurer) Run

func (m *Measurer) Run(ctx context.Context, args *model.ExperimentArgs) error

Run implements model.ExperimentMeasurer.Run.

type ServerInfo

type ServerInfo struct {
	Hostname string `json:"hostname"`
	Site     string `json:"site,omitempty"`
}

ServerInfo contains information on the selected server.

This is currently an extension to the DASH specification until the data format of mlab locate v2 is finalized.

type Simple

type Simple struct {
	ConnectLatency  float64 `json:"connect_latency"`
	MedianBitrate   int64   `json:"median_bitrate"`
	MinPlayoutDelay float64 `json:"min_playout_delay"`
}

Simple contains the experiment summary.

type SummaryKeys

type SummaryKeys struct {
	Latency   float64 `json:"connect_latency"`
	Bitrate   float64 `json:"median_bitrate"`
	Delay     float64 `json:"min_playout_delay"`
	IsAnomaly bool    `json:"-"`
}

SummaryKeys contains summary keys for this experiment.

func (*SummaryKeys) Anomaly added in v0.28.0

func (sk *SummaryKeys) Anomaly() bool

Anomaly implements model.MeasurementSummary.

type TestKeys

type TestKeys struct {
	// ServerInfo contains information about the server we used.
	Server ServerInfo `json:"server"`

	// Simple contains simple summary statistics.
	Simple Simple `json:"simple"`

	// Failure is the failure that occurred.
	Failure *string `json:"failure"`

	// ReceiverData contains the results.
	//
	// WARNING: refactoring this field to become []*clientResults
	// would be disastrous because the measurement loop relies
	// on this slice being []clientResults to produce distinct results.
	ReceiverData []clientResults `json:"receiver_data"`
}

TestKeys contains the test keys.

func (*TestKeys) MeasurementSummaryKeys added in v0.28.0

func (tk *TestKeys) MeasurementSummaryKeys() model.MeasurementSummaryKeys

MeasurementSummaryKeys implements model.MeasurementSummaryKeysProvider.

Jump to

Keyboard shortcuts

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