dashboard

package
v0.0.0-...-c9cfaf6 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Overview

Package dashboard implements a web frontend for browsing performance data.

Index

Constants

This section is empty.

Variables

View Source
var (
	AssetFileSystem    = fs.NewMemWithFiles(assets)
	TemplateFileSystem = fs.NewSub(AssetFileSystem, "templates")
	StaticFileSystem   = fs.NewSub(AssetFileSystem, "static")
)

Embedded asset filesystems.

Functions

This section is empty.

Types

type BenchmarkGroup

type BenchmarkGroup struct {
	Name  string
	Units []*entity.Benchmark
}

type Change

type Change struct {
	Benchmark   *entity.Benchmark
	Environment string
	change.Change
}

Change is a single change.

func (*Change) Type

func (c *Change) Type() change.Type

type CommitChangeGroup

type CommitChangeGroup struct {
	Index   int
	SHA     string
	Subject string
	Changes []*Change
}

CommitChangeGroup is a group of significant changes for a commit.

func (*CommitChangeGroup) MaxAbsPercentChange

func (g *CommitChangeGroup) MaxAbsPercentChange() float64

type Handlers

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

func NewHandlers

func NewHandlers(d *db.DB, opts ...Option) *Handlers

func (*Handlers) About

func (h *Handlers) About(w http.ResponseWriter, r *http.Request) error

func (*Handlers) Benchmark

func (h *Handlers) Benchmark(w http.ResponseWriter, r *http.Request) error

func (*Handlers) Changes

func (h *Handlers) Changes(w http.ResponseWriter, r *http.Request) error

func (*Handlers) Commit

func (h *Handlers) Commit(w http.ResponseWriter, r *http.Request) error

func (*Handlers) File

func (h *Handlers) File(w http.ResponseWriter, r *http.Request) (err error)

func (*Handlers) Index

func (h *Handlers) Index(w http.ResponseWriter, r *http.Request) error

func (*Handlers) Init

func (h *Handlers) Init(ctx context.Context) error

func (*Handlers) Module

func (h *Handlers) Module(w http.ResponseWriter, r *http.Request) error

func (*Handlers) Modules

func (h *Handlers) Modules(w http.ResponseWriter, r *http.Request) error

func (*Handlers) Package

func (h *Handlers) Package(w http.ResponseWriter, r *http.Request) error

func (*Handlers) Result

func (h *Handlers) Result(w http.ResponseWriter, r *http.Request) error

func (*Handlers) ServeHTTP

func (h *Handlers) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Option

type Option func(*Handlers)

func WithCacheControl

func WithCacheControl(cc httputil.CacheControl) Option

func WithDataFileSystem

func WithDataFileSystem(r fs.Readable) Option

func WithLogger

func WithLogger(l *zap.Logger) Option

func WithStaticFileSystem

func WithStaticFileSystem(r fs.Readable) Option

func WithTemplates

func WithTemplates(t *Templates) Option

type PointsGroup

type PointsGroup struct {
	Title       string
	Environment entity.Properties
	Points      entity.Points
	Filtered    []float64
	Quantities  []units.Quantity
}

PointsGroup is a benchmark timeseries for a given environment.

type Templates

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

Templates manages a set of templates with a base layout.

func NewTemplates

func NewTemplates(r fs.Readable) *Templates

NewTemplates initializes a template collection.

func (*Templates) ExecuteTemplate

func (t *Templates) ExecuteTemplate(ctx context.Context, w io.Writer, path, name string, data interface{}) error

ExecuteTemplate loads and renders the given template to w.

func (*Templates) Func

func (t *Templates) Func(name string, f interface{})

Func declares a template function.

func (*Templates) Init

func (t *Templates) Init(ctx context.Context) error

func (*Templates) SetCacheEnabled

func (t *Templates) SetCacheEnabled(enabled bool)

SetCacheEnabled configures whether templates are cached.

func (*Templates) Template

func (t *Templates) Template(ctx context.Context, path string) (*template.Template, error)

Template parses and returns a template file. The template will be returned from a cache if it has been loaded before.

Jump to

Keyboard shortcuts

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