Documentation ¶
Overview ¶
Package benchmark provides utilities for running Google Benchmark binaries on device.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtraArgs ¶
func ExtraArgs(args ...string) option
ExtraArgs sets a list of arguments that will be passed to the benchmark binary.
func OutputFile ¶
func OutputFile(file string) option
OutputFile sets the additional output file path.
func OutputResultFormat ¶
func OutputResultFormat(format Format) option
OutputResultFormat sets the output formatting for the additional output file.
Types ¶
type Benchmark ¶
type Benchmark struct {
// contains filtered or unexported fields
}
Benchmark encapsulates all the context for running a benchmark binary.
type Context ¶
type Context struct { Date string `json:"date"` HostName string `json:"host_name"` Executable string `json:"executable"` NumCPUs int `json:"num_cpus"` MhzPerCPU int `json:"mhz_per_cpu"` CPUScalingEnabled bool `json:"cpu_scaling_enabled"` Cached []struct { Type string `json:"type"` Level int `json:"level"` Size int `json:"size"` NumSharing int `json:"num_sharing"` } `json:"caches"` LoadAvg []float32 `json:"load_avg"` LibraryBuildType string `json:"library_build_type"` }
Context is a struct representing the device context as probed by the benchmark binary.
type Output ¶
type Output struct { Name string `json:"name"` FamilyIndex int `json:"family_index"` PerFamilyInstanceIndex int `json:"per_family_instance_index"` RunName string `json:"run_name"` RunType string `json:"run_type"` Repetitions int `json:"repetitions"` RepetitionIndex int `json:"repetition_index"` Threads int `json:"threads"` Iterations int `json:"iterations"` RealTime float64 `json:"real_time"` CPUTime float64 `json:"cpu_time"` TimeUnit string `json:"time_unit"` }
Output is a struct representing one benchmark execution output.
Click to show internal directories.
Click to hide internal directories.