common

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetricsLen is used to create the objects that store the parsed metrics
	MetricsLen = 100000
)

Variables

This section is empty.

Functions

func ConvertToM3

func ConvertToM3(fileName string, workers int, f func(*M3Metric))

ConvertToM3 parses the json file that is generated from InfluxDB's bulk_data_gen tool

func ConvertToProm

func ConvertToProm(fileName string, workers int, batchSize int, f func(*bytes.Reader))

ConvertToProm parses the json file that is generated from InfluxDB's bulk_data_gen tool into Prom format

func PostEncodedSnappy

func PostEncodedSnappy(url string, body io.Reader) (*http.Response, error)

PostEncodedSnappy wraps request with content headers then POSTs to url with given body

Types

type M3Metric

type M3Metric struct {
	ID    string
	Time  time.Time
	Value float64
}

M3Metric is a lighterweight Metrics struct

type Metrics

type Metrics struct {
	Name  string            `json:"metric"`
	Time  int64             `json:"timestamp"`
	Tags  map[string]string `json:"tags"`
	Value float64           `json:"value"`
}

Metrics is the OpenTSDB style metrics

Jump to

Keyboard shortcuts

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