Documentation
¶
Index ¶
- Constants
- func CreateTestTSDB(t testing.TB, v3ioConfig *config.V3ioConfig)
- func CreateTestTSDBWithAggregates(t testing.TB, v3ioConfig *config.V3ioConfig, aggregates string)
- func DateStringToMillis(date string) (int64, error)
- func DeleteTSDB(t testing.TB, v3ioConfig *config.V3ioConfig)
- func GetV3ioConfigPath() (string, error)
- func InsertData(t *testing.T, testParams TestParams) *V3ioAdapter
- func LoadV3ioConfig() (*config.V3ioConfig, error)
- func NanosToMillis(nanos int64) int64
- func NormalizePath(path string) string
- func PrefixTablePath(tablePath string) string
- func SetUp(t testing.TB, testParams TestParams) func()
- func SetUpWithDBConfig(t *testing.T, schema *config.Schema, testParams TestParams) func()
- func SetUpWithData(t *testing.T, testOpts TestParams) (*V3ioAdapter, func())
- func ValidateCountOfSamples(t testing.TB, adapter *V3ioAdapter, metricName string, expected int, ...)
- func ValidateRawData(t testing.TB, adapter *V3ioAdapter, metricName string, ...)
- type DataPoint
- type DataPointTimeSorter
- type Metric
- type Sample
- type TestOption
- type TestParams
- type TimeSeries
Constants ¶
View Source
const DaysInMillis = 24 * HoursInMillis
View Source
const HoursInMillis = 60 * MinuteInMillis
View Source
const MinuteInMillis = 60 * 1000
View Source
const OptDropTableOnTearDown = "DropTableOnTearDown"
View Source
const OptIgnoreReason = "IgnoreReason"
View Source
const OptTimeSeries = "TimeSeries"
View Source
const OptV3ioConfig = "V3ioConfig"
View Source
const TsdbDefaultTestConfigPath = "testdata"
Variables ¶
This section is empty.
Functions ¶
func CreateTestTSDB ¶
func CreateTestTSDB(t testing.TB, v3ioConfig *config.V3ioConfig)
func CreateTestTSDBWithAggregates ¶ added in v0.8.0
func CreateTestTSDBWithAggregates(t testing.TB, v3ioConfig *config.V3ioConfig, aggregates string)
func DateStringToMillis ¶ added in v0.8.9
func DeleteTSDB ¶
func DeleteTSDB(t testing.TB, v3ioConfig *config.V3ioConfig)
func GetV3ioConfigPath ¶
This method will try and load the configuration file from several locations by the following order: 1. Environment variable named 'V3IO_TSDB_CONFIG' 2. Current package's 'testdata/v3io-tsdb-config.yaml' folder 3. $GOPATH/src/github.com/v3io/v3io-tsdb/v3io-tsdb-config.yaml
func InsertData ¶
func InsertData(t *testing.T, testParams TestParams) *V3ioAdapter
func LoadV3ioConfig ¶
func LoadV3ioConfig() (*config.V3ioConfig, error)
func NanosToMillis ¶ added in v0.8.3
func NormalizePath ¶
func PrefixTablePath ¶ added in v0.0.13
func SetUp ¶
func SetUp(t testing.TB, testParams TestParams) func()
func SetUpWithDBConfig ¶
func SetUpWithDBConfig(t *testing.T, schema *config.Schema, testParams TestParams) func()
func SetUpWithData ¶
func SetUpWithData(t *testing.T, testOpts TestParams) (*V3ioAdapter, func())
func ValidateCountOfSamples ¶
Types ¶
type DataPointTimeSorter ¶
type DataPointTimeSorter []DataPoint
DataPointTimeSorter sorts DataPoints by time
func (DataPointTimeSorter) Len ¶
func (a DataPointTimeSorter) Len() int
func (DataPointTimeSorter) Less ¶
func (a DataPointTimeSorter) Less(i, j int) bool
func (DataPointTimeSorter) Swap ¶
func (a DataPointTimeSorter) Swap(i, j int)
type TestOption ¶ added in v0.8.3
type TestOption struct { Key string Value interface{} }
type TestParams ¶ added in v0.8.3
type TestParams map[string]interface{}
func NewTestParams ¶ added in v0.8.3
func NewTestParams(t testing.TB, opts ...TestOption) TestParams
func (TestParams) DropTableOnTearDown ¶ added in v0.8.3
func (tp TestParams) DropTableOnTearDown() bool
func (TestParams) IgnoreReason ¶ added in v0.8.3
func (tp TestParams) IgnoreReason() string
func (TestParams) TimeSeries ¶ added in v0.8.3
func (tp TestParams) TimeSeries() TimeSeries
func (TestParams) V3ioConfig ¶ added in v0.8.3
func (tp TestParams) V3ioConfig() *config.V3ioConfig
type TimeSeries ¶ added in v0.8.3
type TimeSeries []Metric
Click to show internal directories.
Click to hide internal directories.