benchmarks

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRandStringGen

func NewRandStringGen(size int) *randStringGen

func ToHumanReadable

func ToHumanReadable(b uint64) string

Types

type Benchmark

type Benchmark interface {

	// Get benchmark's name
	Name() string

	// Do a test warmup
	Warmup() error

	// Cleanup after the test
	Cleanup() error

	// Run the test, return the cumulative statistics after the whole run
	Run(duration time.Duration, seed uint64) (interface{}, error)

	// Gather current snapshot of probes
	// This should be delta since the previous probe - e.g. req/sec that happened
	// between this and previous run.
	// It will be called in parallel while the `Run` call is still ongoing
	Probe() interface{}
}

type HWStats

type HWStats struct {
	CPUTime               float64 `json:"cpuTime"`               // Total about of CPU time used by the process in seconds
	CPUKernelTimeFraction float64 `json:"cpuTimeKernelFraction"` // Fraction of the total CPU time that was spent on the kernel side
	VMM                   uint64  `json:"vmm"`                   // Virtual memory used
	RSS                   uint64  `json:"rss"`                   // Resident memory used
	IOBytesRead           uint64  `json:"ioBytesRead"`           // Number of bytes read
	IOBytesWrite          uint64  `json:"ioBytesWrite"`          // Number of bytes written
	IOCallsRead           uint64  `json:"ioCallsRead"`           // Number of io read syscalls
	IOCallsWrite          uint64  `json:"ioCallsWrite"`          // Number of io write syscalls
}

HWStats contains basic information about hardware properties

func (*HWStats) String

func (h *HWStats) String() string

type HWStatsProber

type HWStatsProber struct {
	// contains filtered or unexported fields
}

func NewHWStatsProber

func NewHWStatsProber() (*HWStatsProber, error)

func (*HWStatsProber) GetHWStats

func (h *HWStatsProber) GetHWStats() (*HWStats, error)

type KeyTracker

type KeyTracker struct {
	// contains filtered or unexported fields
}

func NewKeyTracker

func NewKeyTracker(start uint64) *KeyTracker

func (*KeyTracker) GetRKey

func (kt *KeyTracker) GetRKey() string

func (*KeyTracker) GetWKey

func (kt *KeyTracker) GetWKey() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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