mako

package
v0.0.0-...-75da391 Latest Latest
Warning

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

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

README

Mako

Mako is an open source project for performance testing in Knative. It offers capacities like data storage, charting, statistical aggregation and automated regression analysis.

This folder contains common code that can be used by all Knative projects, with which we can follow the same process to set up Mako and collaborate.

Documentation

Index

Constants

View Source
const (
	// ConfigName is the name of the config map for mako options.
	ConfigName = "config-mako"
)

Variables

This section is empty.

Functions

func EscapeTag

func EscapeTag(tag string) string

EscapeTag replaces characters that Mako doesn't accept with ones it does.

func MustGetBenchmark

func MustGetBenchmark() *string

MustGetBenchmark wraps getBenchmark in log.Fatalf

func MustGetTags

func MustGetTags() []string

MustGetTags returns the additional tags from the configmap, or dies.

func NewCrossRunConfig

func NewCrossRunConfig(runCount int32, tags ...string) *tpb.CrossRunConfig

NewCrossRunConfig returns a config that can be used in ThresholdAnalyzer. By using it, the Analyzer will only fail if there are xx continuous runs that cross the threshold.

func Setup

func Setup(ctx context.Context, extraTags ...string) (context.Context, *quickstore.Quickstore, func(context.Context), error)

Setup sets up the mako client for the provided benchmarkKey. It will add a few common tags and allow each benchmark to add custm tags as well. It returns the mako client handle to store metrics, a method to close the connection to mako server once done and error in case of failures.

func XTime

func XTime(t time.Time) float64

XTime converts a time.Time into a Mako x-axis compatible timestamp.

Types

type Config

type Config struct {
	// Environment holds the name of the environement,
	// where the test runs, e.g. `dev`.
	Environment string

	// List of additional tags to apply to the run.
	AdditionalTags []string
}

Config defines the mako configuration options.

func NewConfigFromConfigMap

func NewConfigFromConfigMap(configMap *corev1.ConfigMap) (*Config, error)

NewConfigFromConfigMap creates a Config from the supplied ConfigMap

func NewConfigFromMap

func NewConfigFromMap(data map[string]string) (*Config, error)

NewConfigFromMap creates a Config from the supplied map

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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