metrics

package
v2.5.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: MIT Imports: 13 Imported by: 1

Documentation

Overview

Package metrics contains all the code that is used to collect metrics from the target

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopulateDatabaseMetrics

func PopulateDatabaseMetrics(i *integration.Integration, instanceName string, connection *connection.SQLConnection, arguments args.ArgumentList) error

PopulateDatabaseMetrics collects per-database metrics

func PopulateInstanceMetrics

func PopulateInstanceMetrics(instanceEntity *integration.Entity, connection *connection.SQLConnection, arguments args.ArgumentList)

PopulateInstanceMetrics creates instance-level metrics

Types

type QueryDefinition

type QueryDefinition struct {
	// contains filtered or unexported fields
}

QueryDefinition defines a single query with it's associated data model which has struct tags for metric.Set

func (QueryDefinition) GetDataModels

func (qd QueryDefinition) GetDataModels() interface{}

GetDataModels retrieves the DataModels to be passed to the sqlx call for results to be martialed into

func (QueryDefinition) GetQuery

func (qd QueryDefinition) GetQuery(modifiers ...QueryModifier) string

GetQuery retrieves the query for a QueryDefinition

type QueryModifier

type QueryModifier func(string) string

QueryModifier is a function that takes in a query, does any modification and returns the query

Jump to

Keyboard shortcuts

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