bench

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUInfo

type CPUInfo struct {
	Model string
	Cores int32
}

type DiskBench added in v0.2.0

type DiskBench struct {
	Name     string
	Size     int64
	Times    int
	Duration time.Duration
	Speed    float64
	// contains filtered or unexported fields
}

func NewDiskBench added in v0.2.0

func NewDiskBench(size int64, duration time.Duration) (b *DiskBench)

func (*DiskBench) Do added in v0.2.0

func (b *DiskBench) Do() (err error)

func (*DiskBench) Result added in v0.2.0

func (b *DiskBench) Result() (result string)

type Info

type Info struct {
	CPUInfo
	SystemInfo
	MemoryInfo
}

func GetInfo

func GetInfo() (info *Info, err error)

type MemoryBench added in v0.2.0

type MemoryBench struct {
	Name     string
	Size     int64
	Times    int
	Duration time.Duration
	Speed    float64
	// contains filtered or unexported fields
}

func NewMemoryBench added in v0.2.0

func NewMemoryBench(size int64, times int) (b *MemoryBench)

func (*MemoryBench) Do added in v0.2.0

func (b *MemoryBench) Do()

func (*MemoryBench) Result added in v0.2.0

func (b *MemoryBench) Result() (result string)

type MemoryInfo

type MemoryInfo struct {
	Total     uint64
	Used      uint64
	TotalSwap uint64
	UsedSwap  uint64
}

type Result added in v0.2.0

type Result struct {
	Info
	SHA3Bench
	MemoryBenches []MemoryBench
	SpeedTests    []SpeedTest
	Time          time.Time
}

type SHA3Bench added in v0.2.0

type SHA3Bench struct {
	Name     string
	Thread   int
	Size     int64
	Duration time.Duration
	Hashes   int
	Speed    float64
	// contains filtered or unexported fields
}

func NewSHA3Bench added in v0.2.0

func NewSHA3Bench(thread int, size int64, duration time.Duration) (b *SHA3Bench)

func (*SHA3Bench) Do added in v0.2.0

func (b *SHA3Bench) Do() (err error)

func (*SHA3Bench) Result added in v0.2.0

func (b *SHA3Bench) Result() (result string)

type SpeedTest

type SpeedTest struct {
	Name     string
	URL      string
	Size     int64
	Duration time.Duration
	Speed    float64
	// contains filtered or unexported fields
}

func NewSpeedTest

func NewSpeedTest(name, url string, size int64) (st *SpeedTest)

func (*SpeedTest) Do

func (st *SpeedTest) Do() (err error)

func (*SpeedTest) Result

func (st *SpeedTest) Result() (result string)

type SystemInfo

type SystemInfo struct {
	Hostname        string
	OS              string
	Platform        string
	PlatformVersion string
	KernelVersion   string
	Arch            string
	Virt            string
}

type ZeroReadWriter

type ZeroReadWriter struct{}

func (*ZeroReadWriter) Read

func (z *ZeroReadWriter) Read(p []byte) (n int, err error)

func (*ZeroReadWriter) Write

func (z *ZeroReadWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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