metrics-generator

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: MIT Imports: 15 Imported by: 0

README

Metrics Generator

Metrics Generator pretends to continuously receive a certain amount of requests and exposes two metrics related to these requests:

  • metrics_generator_request_duration_seconds - histogram - The duration of the requests, in seconds.
  • metrics_generator_request_errors_count - counter - The number of requests resulting in an error.

CLI

Metrics Generator accepts flags to initialize the rate of the simulated request, the maximum request duration and the percentage of requests that will result in an error. Use the -help flag to see the command's help.

API

Metrics Generator exposes a minimal API for reporting its health and for changing at runtime the behaviour around the simulated requests.

GET /-/health

Always return a 200 response.

PUT /-/config/max-duration

Set the maximum duration of the simulated requests to the value passed in the body of the request. The value must be a positive integer.

PUT /-/config/errors-percentage

Set the percentage of the simulated requests that will result in an error to the value passed in the body of the request. It must be an integer between 0 and 100.

PUT /-/config/request-rate

Set the rate of the simulated requests to the value passed in the body of the request. It must be a strictly positive integer.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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