storage

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PerOpSeconds represents metric of seconds per operation
	PerOpSeconds = "bblfsh_bench_seconds"
	// PerOpAllocBytes represents metric of bytes allocated per operation
	PerOpAllocBytes = "bblfsh_bench_allocs_bytes"
	// PerOpAllocs represents metric of allocations per operation
	PerOpAllocs = "bblfsh_bench_allocs"
)

Variables

This section is empty.

Functions

func Register

func Register(kind string, c Constructor)

Register updates the map of known storage clients constructors

Types

type Client

type Client interface {
	// Dump stores given benchmark results with tags to storage
	Dump(tags map[string]string, benchmarks ...performance.Benchmark) error
	// Close closes client's connection to the storage if needed
	Close() error
}

Client is an interface for storage clients

func NewClient

func NewClient(kind string) (Client, error)

NewClient takes a given kind and creates related storage client

type Constructor

type Constructor func() (Client, error)

Constructor is a type that represents function of default storage client Constructor

func ValidateKind

func ValidateKind(kind string) (Constructor, error)

ValidateKind checks if a given kind is supported This method should be useful when long-term tests are performed so kind can be checked much earlier then storage client acquired and prevent the situation when tests passed and store failed because kind is not supported

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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