stats

package
Version: v0.0.0-...-619c5da Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlackholeStats

type BlackholeStats struct{}

Drop all statistics

func (*BlackholeStats) LookupCountIncr

func (t *BlackholeStats) LookupCountIncr()

func (*BlackholeStats) LookupNumberOfJumps

func (t *BlackholeStats) LookupNumberOfJumps(n int)

func (*BlackholeStats) LookupTime

func (t *BlackholeStats) LookupTime(duration time.Duration)

func (*BlackholeStats) SuccessfulCacheResult

func (t *BlackholeStats) SuccessfulCacheResult()

type ChordStats

type ChordStats interface {

	// How many jumps did a lookup take
	LookupNumberOfJumps(n int)

	// How long did a lookup take
	LookupTime(duration time.Duration)

	// Track successful cache results
	SuccessfulCacheResult()

	// Track how many lookups are performed
	LookupCountIncr()
}

Capture statistics of Chord operations

type PrintStats

type PrintStats struct {
	LookupNumberOfJumpsArr []int
	LookupTimeArr          []time.Duration
	SuccessfulCacheResults int
	LookupCount            int
}

Just print the stats to the console

func NewPrintStats

func NewPrintStats() *PrintStats

func (*PrintStats) LookupCountIncr

func (t *PrintStats) LookupCountIncr()

func (*PrintStats) LookupNumberOfJumps

func (t *PrintStats) LookupNumberOfJumps(n int)

func (*PrintStats) LookupTime

func (t *PrintStats) LookupTime(duration time.Duration)

func (*PrintStats) Print

func (t *PrintStats) Print()

func (*PrintStats) SuccessfulCacheResult

func (t *PrintStats) SuccessfulCacheResult()

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL