metric

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IndexerUseCaseDuration = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "figment",
			Subsystem: "indexer",
			Name:      "use_case_duration",
			Help:      "The total time required to execute use case",
		},
		[]string{"task"},
	)

	IndexerDbSizeAfterHeight = prometheus.NewGauge(prometheus.GaugeOpts{
		Namespace: "figment",
		Subsystem: "indexer",
		Name:      "db_size",
		Help:      "The size of the database after indexing of height",
	})
)
View Source
var (
	DatabaseQueryDuration = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "figment",
			Subsystem: "database",
			Name:      "query_duration",
			Help:      "The total time required to execute query on database",
		},
		[]string{"query"},
	)

	ServerRequestDuration = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "figment",
			Subsystem: "server",
			Name:      "request_duration",
			Help:      "The total time required to execute http request",
		},
		[]string{"request"},
	)
)

Functions

func LogUseCaseDuration

func LogUseCaseDuration(start time.Time, useCaseName string)

Types

type IndexerMetric

type IndexerMetric struct{}

IndexerMetric handles HTTP requests

func NewIndexerMetric

func NewIndexerMetric() *IndexerMetric

NewIndexerMetric returns a new server instance

func (*IndexerMetric) StartServer

func (m *IndexerMetric) StartServer(listenAdd string, url string) error

type ServerMetric

type ServerMetric struct{}

ServerMetric handles HTTP requests

func NewServerMetric

func NewServerMetric() *ServerMetric

NewDatabaseMetric returns a new server instance

func (*ServerMetric) StartServer

func (m *ServerMetric) StartServer(listenAdd string, url string) error

Jump to

Keyboard shortcuts

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