benchmarks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Descriptions = map[string]desc{
	"sum":        desc{1, "Sum one column"},
	"mean":       desc{2, "Simple mean of one column"},
	"median":     desc{3, "Median of one column"},
	"min":        desc{4, "Min of one column"},
	"max":        desc{5, "Max of one column"},
	"std":        desc{6, "Standard deviation of one column"},
	"readCSVSum": desc{7, "Read in CSV then calculate sum"},
	"sum2":       desc{8, "Sum two columns"},
	"mean2":      desc{8, "Mean of two columns"},
}

Descriptions of the benchmarking tests

View Source
var SampleSizes = []string{"100k", "500k"}

SampleSizes is all the potential sample sizes and the order in which they should appear in the comparison table.

Functions

func CompareBenchmarks

func CompareBenchmarks(
	goBenchmarks, pyBenchmarks Results,
	sampleSizes []string,
	descs map[string]desc,
) string

CompareBenchmarks creates a comparison table of GoPandas <> Pandas for equivalent operations

func ReadData

func ReadData()

ReadData initializes data for use in comparison tetss

Types

type Result

type Result []interface{}

A Result of benchmarking data in the form [string, float64]

func ProfileGo

func ProfileGo(f func(b *testing.B)) Result

ProfileGo runs the normal Go benchmarking command but formats the result as a rounded string and raw ns float

type Results

type Results map[string]map[string]Result

Results contains benchmarking results {"num of samples": {"test1": "10ms"...}}

func RunGoProfiler

func RunGoProfiler() Results

RunGoProfiler specifies all the benchmarks to profile and return in the benchmark table.

func RunPythonProfiler

func RunPythonProfiler() Results

RunPythonProfiler executes main.py in this directory, which is expected to return JSON in the form of Results. This command is expected to be initiated from the directory above.

Jump to

Keyboard shortcuts

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