Documentation ¶
Index ¶
- func AddUser()
- func PullMetrics(ctx context.Context, metricsPort int, registeredActions []string) error
- func PushMetrics(ctx context.Context, metricsTarget, job string, ...) error
- func RemoveUser()
- func ReportApiResult(action, label, path, method string, responseCode int, duration time.Duration)
- func ReportError(action string, label string)
- func ReportFailure(action string, label string)
- func ReportSuccess(action string, label string, time float64)
- func ReportWarning(action string, label string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUser ¶
func AddUser()
AddUser is invoked when a new simulated user is added. This then updates Prometheus metrics correlating to this (Users total | Active users)
func PullMetrics ¶
PullMetrics is called once to setup and enable Prometheus pull metrics on a certain endpoint
func PushMetrics ¶
func PushMetrics(ctx context.Context, metricsTarget, job string, groupingKeys, registeredActions []string, enableApiMetrics bool) error
PushMetrics is called once to setup and enable Prometheus push metrics to specified address
func RemoveUser ¶
func RemoveUser()
RemoveUser is invoked when a new simulated user is added. This then updates Prometheus metrics correlating to this (Decrements Active users). Note Total users is for obvious reasons not decremented
func ReportApiResult ¶ added in v0.6.25
ReportApiResult reports the duration for a specific API path and response code
func ReportError ¶
ReportError is invoked when an error occurs in execution. A user action can in theory have many errors. This then updates Prometheus metrics correlating to this (Error counter)
func ReportFailure ¶
ReportFailure is invoked when a simulated user action fails. This then updates Prometheus metrics correlating to this (Failure counter for an action)
func ReportSuccess ¶
ReportSuccess is invoked when a simulated user action is successfully completed. This then updates Prometheus metrics correlating to this (ReponseTimes | Latency | success counter for an action)
func ReportWarning ¶
ReportWarning is invoked when an warning occurs in execution. A user action can in theory have many warnings. This then updates Prometheus metrics correlating to this (Warning counter)
Types ¶
This section is empty.