measurement

package
v0.0.0-...-6eb52ac Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(mm Manager, m *api.Measurement) *errors.ErrorList

Execute executes a measurement, which can be a single measurement or a wrapper for multiple measurements.

func Register

func Register(methodName string, createFunc createMeasurementFunc) error

Register registers create measurement function in measurement factory.

Types

type Config

type Config struct {
	// ClusterFramework returns cluster framework.
	ClusterFramework *framework.Framework
	// PrometheusFramework returns prometheus framework.
	PrometheusFramework *framework.Framework
	// Params is a map of {name: value} pairs enabling for injection of arbitrary config
	// into the Execute method.
	Params map[string]interface{}
	// TemplateProvider provides templated objects.
	TemplateProvider    *config.TemplateProvider
	ClusterLoaderConfig *config.ClusterLoaderConfig

	// Identifier identifies this instance of measurement.
	Identifier    string
	CloudProvider provider.Provider

	// ClusterVersion contains the version of the cluster and is used to select
	// available metrics.
	ClusterVersion version.Info
}

Config provides client and parameters required for the measurement execution.

type Manager

type Manager interface {
	Execute(methodName string, identifier string, params map[string]interface{}) error
	GetSummaries() []Summary
	Dispose()
}

Manager provides the interface for measurementManager

func CreateManager

func CreateManager(clusterFramework, prometheusFramework *framework.Framework, templateProvider *config.TemplateProvider, config *config.ClusterLoaderConfig) Manager

CreateManager creates new instance of measurementManager.

type Measurement

type Measurement interface {
	Execute(config *Config) ([]Summary, error)
	Dispose()
	String() string
}

Measurement is an common interface for all measurements methods. It should be implemented by the user to allow his/her measurement method to be registered in the measurement factory. See https://github.com/kubernetes/perf-tests/blob/master/clusterloader2/docs/design.md for reference.

func CreateMeasurement

func CreateMeasurement(methodName string) (Measurement, error)

CreateMeasurement creates measurement instance.

type Summary

type Summary interface {
	SummaryName() string
	SummaryExt() string
	SummaryTime() time.Time
	SummaryContent() string
}

Summary represenst result of specific measurement.

func CreateSummary

func CreateSummary(name, ext, content string) Summary

CreateSummary creates generic summary.

Directories

Path Synopsis
dns
network
Package network captures network performance metrics for protocol TCP,UDP,HTTP etc.
Package network captures network performance metrics for protocol TCP,UDP,HTTP etc.

Jump to

Keyboard shortcuts

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