parser

package
v0.0.0-...-91dc4c6 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJson

func GenerateJson(logger *slog.Logger, benchmarksDir string, pretty bool) ([]byte, error)

Types

type Benchmark

type Benchmark struct {
	Name          string // Name of the benchmark
	Description   string // Description of the benchmark
	BenchmarkCode string
	Code          string
	Variations    []Variation
}

type BenchmarkGroup

type BenchmarkGroup struct {
	Name        string // Name of the dir where the benchmark is located
	Headline    string
	Description string
	Benchmarks  []Benchmark
	Code        string
	Constants   string
}

func ProcessBenchmarkGroups

func ProcessBenchmarkGroups(logger *slog.Logger, benchmarksDir string) (groups []BenchmarkGroup, err error)

type BenchmarkMeta

type BenchmarkMeta struct {
	Name         string   `json:"name"`
	Headline     string   `json:"headline"`
	Description  string   `json:"description"`
	Tags         []string `json:"tags"`
	Contributors []string `json:"contributors"`
	Meta         []struct {
		Implementation string `json:"implementation"`
		Description    string `json:"description"`
	} `json:"meta"`
}

type Variation

type Variation struct {
	parse.Benchmark
	Name      string  // Name of the variation
	CPUCount  int     // Number of CPU cores used
	OpsPerSec float64 // Performance of the benchmark compared to the fastest benchmark
}

Jump to

Keyboard shortcuts

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