score

package
v0.9.16-beta-16 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddKeeper

func AddKeeper(keeper *Keeper) error

Types

type Axis

type Axis interface {
	Setup(bench *data.Benchmarks, warns *data.Warnings) error
	Name() string
	ScoreFor(handler data.HandlerTag) Value
	Summary() template.HTML
	Exhibits() []Exhibit
	Documentation() template.HTML
}

type Exhibit

type Exhibit interface {
	HTML(data any) template.HTML
}

type ExhibitCore

type ExhibitCore struct {
	// contains filtered or unexported fields
}

func NewExhibitCore

func NewExhibitCore(tmpl *template.Template) ExhibitCore

func (*ExhibitCore) HTML

func (ec *ExhibitCore) HTML(data any) template.HTML

type Keeper

type Keeper struct {
	KeeperOptions
	// contains filtered or unexported fields
}

func GetKeeper

func GetKeeper(tag KeeperTag) *Keeper

func NewKeeper

func NewKeeper(tag KeeperTag, x, y Axis, doc template.HTML, options *KeeperOptions) *Keeper

func (*Keeper) ChartCaption

func (k *Keeper) ChartCaption() template.HTML

func (*Keeper) ChartTitle

func (k *Keeper) ChartTitle() template.HTML

func (*Keeper) Name

func (k *Keeper) Name() string

func (*Keeper) Overview

func (k *Keeper) Overview() template.HTML

Overview returns documentation applicable to all scorekeepers.

func (*Keeper) Setup

func (k *Keeper) Setup(bench *data.Benchmarks, warns *data.Warnings) error

func (*Keeper) Summary

func (k *Keeper) Summary() template.HTML

Summary returns documentation related to the current scorekeeper object.

func (*Keeper) Tag

func (k *Keeper) Tag() KeeperTag

func (*Keeper) X

func (k *Keeper) X() Axis

func (*Keeper) Y

func (k *Keeper) Y() Axis

type KeeperOptions

type KeeperOptions struct {
	ChartCaption, ChartTitle template.HTML
}

type KeeperTag

type KeeperTag string

func Keepers

func Keepers() []KeeperTag

type Value

type Value float64

func (Value) Round

func (v Value) Round() Value

Jump to

Keyboard shortcuts

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