psiphon

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package psiphon implements the psiphon network experiment. This implements, in particular, v0.2.0 of the spec.

See https://github.com/ooni/spec/blob/master/nettests/ts-015-psiphon.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's configuration.

type Measurer

type Measurer struct {
	BeforeGetHook func(g urlgetter.Getter)
	Config        Config
}

Measurer is the psiphon measurer.

func (*Measurer) ExperimentName

func (m *Measurer) ExperimentName() string

ExperimentName returns the experiment name

func (*Measurer) ExperimentVersion

func (m *Measurer) ExperimentVersion() string

ExperimentVersion returns the experiment version

func (*Measurer) Run

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

Run runs the measurement

type SummaryKeys

type SummaryKeys struct {
	BootstrapTime float64 `json:"bootstrap_time"`
	Failure       string  `json:"failure"`
	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.MeasurementSummaryKeys.

type TestKeys

type TestKeys struct {
	urlgetter.TestKeys
	MaxRuntime float64 `json:"max_runtime"`
}

TestKeys contains the experiment's result.

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