benchmark

package
v0.0.0-...-7facece Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package benchmark contains benchmarking bound functions for internal use.

Index

Constants

View Source
const (
	ShortString        = "Hello, World!"
	LongString         = "" /* 1610-byte string literal not displayed */
	ShortStringUnicode = "Hello, 世界!"
	LongStringUnicode  = "" /* 1730-byte string literal not displayed */
)

Variables

View Source
var (
	ShortSlice = make([]byte, 10)
	LongSlice  = make([]byte, 100000)
)

Functions

func Manyargs

func Manyargs(_, _, _, _, _, _, _, _, _, _ int)

func Noargs

func Noargs()

func Onearg

func Onearg(_ int)

func Oneret

func Oneret() int

func Ref

func Ref(_ I)

func RunBenchmarks

func RunBenchmarks(b Benchmarks)

func Slice

func Slice(_ []byte)

func String

func String(_ string)

func StringRetLong

func StringRetLong() string

func StringRetShort

func StringRetShort() string

Types

type AnI

type AnI struct {
}

func (*AnI) F

func (_ *AnI) F()

type Benchmarks

type Benchmarks interface {

	// Run runs a named benchmark from a different thread, with
	// no native call prior in the stack.
	Run(name string, n int)
	// RunDirect runs a named benchmark directly, with the native
	// context from the call itself.
	RunDirect(name string, n int)

	// Callbacks for Go benchmarks
	NewI() I
	Noargs()
	Onearg(_ int)
	Oneret() int
	Ref(_ I)
	Manyargs(_, _, _, _, _, _, _, _, _, _ int)
	String(_ string)
	StringRetShort() string
	StringRetLong() string
	Slice(_ []byte)
}

type I

type I interface {
	F()
}

func NewI

func NewI() I

Jump to

Keyboard shortcuts

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