statistics

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutputFormats

func OutputFormats() []app.OutputFormat

func WriteOutput

func WriteOutput(w io.Writer, format app.OutputFormat, result Result) error

Types

type Output

type Output interface {
	Write(io.Writer, Result) error
}

type OutputFunc

type OutputFunc func(io.Writer, Result) error

func (OutputFunc) Write

func (f OutputFunc) Write(w io.Writer, result Result) error

type Rate

type Rate struct {
	TotalAverage  float64       `yaml:"average_total" json:"average_total"`
	ActiveAverage float64       `yaml:"average_active" json:"average_active"`
	Max           float64       `yaml:"max" json:"max"`
	Min           float64       `yaml:"min" json:"min"`
	MaxHour       time.Duration `yaml:"best_hour" json:"best_hour"`
	MinHour       time.Duration `yaml:"slowest_hour" json:"slowest_hour"`
}

func (*Rate) UpdateMinMax

func (r *Rate) UpdateMinMax(value int, offset time.Duration)

type Result

type Result struct {
	ContestName string        `yaml:"contest_name" json:"contest_name"`
	ContestID   string        `yaml:"contest_id" json:"contest_id"`
	StartTime   time.Time     `yaml:"start_time" json:"start_time"`
	Duration    time.Duration `yaml:"duration" json:"duration"`
	ActiveHours int           `yaml:"active_hours" json:"active_hours"`
	QSOs        int           `yaml:"qsos" json:"qsos"`
	Points      int           `yaml:"points" json:"points"`
	Multis      int           `yaml:"multis" json:"multis"`
	Total       int           `yaml:"total" json:"total"`
	QSORate     Rate          `yaml:"qso_rate" json:"qso_rate"`
	PointsRate  Rate          `yaml:"points_rate" json:"points_rate"`
	MultiRate   Rate          `yaml:"multi_rate" json:"multi_rate"`
}

func Evaluate

func Evaluate(logfile app.Logfile, definition *conval.Definition, setup *conval.Setup, startTime time.Time) (Result, error)

Jump to

Keyboard shortcuts

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