gauge

package
v0.0.0-...-55a50c8 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2013 License: AGPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcRates

func CalcRates(trips []*Trip) (sendRate float64, receiveRate float64)

TODO: Don't count drops after one side closes

Types

type LogReducer

type LogReducer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

LogReducer is a dccp.TraceWriter which processes the logs to a form that is convenient as input to illustration tools

func NewLogReducer

func NewLogReducer() *LogReducer

Make a new log reducer

func (*LogReducer) CheckIns

func (t *LogReducer) CheckIns() []*dccp.Trace

CheckIns returns a list of all check-ins

func (*LogReducer) Init

func (t *LogReducer) Init()

Init (re)initializes an existing log reducer structure

func (*LogReducer) Places

func (t *LogReducer) Places() map[string]*Place

Places returns places' histories, keyed by place name

func (*LogReducer) Trips

func (t *LogReducer) Trips() map[int64]*Trip

Trips returns trip records, keyed by SeqNo

func (*LogReducer) Write

func (t *LogReducer) Write(r *dccp.Trace)

type Place

type Place struct {
	CheckIns []*dccp.Trace
	// contains filtered or unexported fields
}

type TraceChrono

type TraceChrono []*dccp.Trace

TraceChrono is a chronological sort driver for []*dccp.Trace

func (TraceChrono) Len

func (t TraceChrono) Len() int

func (TraceChrono) Less

func (t TraceChrono) Less(i, j int) bool

func (TraceChrono) Swap

func (t TraceChrono) Swap(i, j int)

type Trip

type Trip struct {
	SeqNo    int64
	Forward  []*dccp.Trace
	Backward []*dccp.Trace
	Source   string
	Sink     string
	Round    bool
}

A Trip instance captures all packet check-ins whose SeqNo or AckNo are related

func TripMapToSlice

func TripMapToSlice(m map[int64]*Trip) []*Trip

Jump to

Keyboard shortcuts

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