cpubench

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTask

func NewTask() perf.Task

NewTask returns a new CPU benchmark task.

func NewTaskWithExecWrapper added in v1.0.0

func NewTaskWithExecWrapper(execWrapper execwrapper.ExecWrapper) perf.Task

Types

type CPUBenchmarkResult

type CPUBenchmarkResult struct {
	SingleThreaded float64 `json:"single"`
	MultiThreaded  float64 `json:"multi"`
	Threads        int     `json:"threads"`
	Workloads      int     `json:"workloads"`
}

CPUBenchmarkResult holds CPU benchmark results with the workloads number during the benchmark.

type CPUBenchmarkTask

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

CPUBenchmarkTask defines CPU benchmark task.

func (*CPUBenchmarkTask) Cron

func (c *CPUBenchmarkTask) Cron() string

Cron returns task cron schedule.

func (*CPUBenchmarkTask) Description

func (c *CPUBenchmarkTask) Description() string

Description returns task description.

func (*CPUBenchmarkTask) ID

func (c *CPUBenchmarkTask) ID() string

ID returns task ID.

func (*CPUBenchmarkTask) Jitter

func (c *CPUBenchmarkTask) Jitter() uint32

Jitter returns the max number of seconds the job can sleep before actual execution.

func (*CPUBenchmarkTask) Run

func (c *CPUBenchmarkTask) Run(ctx context.Context) (interface{}, error)

Run executes the CPU benchmark.

Jump to

Keyboard shortcuts

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