common

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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