tsdb

package module
v0.0.0-...-387014a Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 12 Imported by: 1

README

Package TSDB

A Go package that creates Prometheus TSDB data for testing purposes.

This code originally comes from the [Thanos][1] authors and is licensed under the Apache License 2.0. Modifications made by Jack Neely and Jarod Watkins of [42 Lines, Inc.][2] include:

  • Produce time series with labels similar to Prometheus scraping many instances of the same application
  • Values recorded is the current time in nanoseconds to simulate ever increasing Counter type metrics.

Jack Neely jjneely@42lines.net 2019/03/13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateThanosTSDB

func CreateThanosTSDB(opts Opts) error

Types

type Opts

type Opts struct {
	OutputDir            string        // The directory to place the generated TSDB blocks. Default /tmp/tsdb.
	NumTimeseries        int           // The number of timeseries to generate. Default 1.
	TotalNumTimeSeries   int           // The total number of timeseries to generate using multiple invocations. Default NumTimeseries.
	TimeseriesStartIndex int           // The start index of timeseries instance names. Default 0
	StartTime            time.Time     // Metrics will be produced from this time. Default now.
	EndTime              time.Time     // Metrics will be produced until this time. Default 1 week.
	SampleInterval       time.Duration // How often to sample the metrics. Default 15s.
	BlockLength          time.Duration // The length of time each block will cover. Default 2 hours.
}

Jump to

Keyboard shortcuts

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