Help us shape the future of Go! Take the 2026 Go Developer Survey

running

package module
v0.0.0-...-fca1a73 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

README

running

Check the running time of your algorithms

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type R

type R struct {

	// N is the number of times the algorithm should run for each input.
	N int
	// contains filtered or unexported fields
}

R is a type passed to Run functions to check running time and support formatted run logs.

func (*R) Run

func (r *R) Run(input Sizer, algorithm func(interface{}) interface{})

Run analyzes a single input and registers its running time.

type Sizer

type Sizer interface {
	Size() int
}

Sizer is implemented by any value that has a Size method. The Size method is used to measure the size of inputs to algorithms.

Jump to

Keyboard shortcuts

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